Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5391659rwb; Tue, 1 Aug 2023 01:32:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0pje/E9yvqtGCLwlZ9slb0QPahbqMlEncQ4e5mIdyAgBQL58bvHCR1WJ9cPCg4Z+D1ZFX X-Received: by 2002:a05:6512:3ee:b0:4fe:3a57:7c90 with SMTP id n14-20020a05651203ee00b004fe3a577c90mr1596054lfq.19.1690878768547; Tue, 01 Aug 2023 01:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690878768; cv=none; d=google.com; s=arc-20160816; b=w/+L8j7tvD1qEThinZK9CL9hX6wIHm+m20hwEAYFljvZlHjPkMMgL5G9ic1bgfpWil 5gs8vBgEBeP5c+n+7h9O1AWeyzd+cD9MjEOK0lgPVlBww22CmJP26E7P8Y6XVA1Z/QQW YHfq904isD/aCkrDLrej0lUURm7TLPxbRlCYmqBYQNVZjtKStGcI+2+W3zE/AhiOD5BO IR/qblQs8ycsSfBj+7/W+mzmgcJrDgykt1/1mVdHftAhL5YQRjIJUi4ubQ0iJjXApmUx 5lDH3/qtNA841XOWKxlDuH+rpjKd09yvzUVa+w+Fc+yWOLrcmI7T6BiW0htrQdXTNxqp mlRQ== 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; bh=CbPouDZSJrAol8sltvW/uImxAyYm27T73KcyB3IYL3U=; fh=TTF1lt49Sby0rKay1qRjEqWFbUkg3/0Ba8LROUDUaGE=; b=vkLFUEvOzNK2zgHGpNMvIYODuah6MpYe51ekld0K+V/MoWE48joOT7jfxXi0jv5aA2 34MGb2GnepPafQcGO/6GNl66fpnbzZ/GrKllbDZIx7IMndJJ+z1hBdscC9AZbJnJ0J1i 68vMOz1pLJwPdZzGPDhRHzfbjmmAk1gK7eTr7fVSHrHOH3WURVxkb/YBhxaiLWDo4iqc ajMCtD+EzBTFb82j6fuYPTfMlJn4Cymzddn5Gs7wU/qCkMqHpwgK5vf+6G/+r+UnFVnJ G48ic6EMmD06UDFtJ67FcUY1PUdZffbMOiHCZkevOcTzXE2w8ZVIYG9Pq4NJhju0pFxE JeZg== 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 j26-20020a50ed1a000000b0052220448d66si1557975eds.283.2023.08.01.01.32.23; Tue, 01 Aug 2023 01:32:48 -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 S232146AbjHAINU (ORCPT + 99 others); Tue, 1 Aug 2023 04:13:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232135AbjHAINS (ORCPT ); Tue, 1 Aug 2023 04:13:18 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5AF71199E; Tue, 1 Aug 2023 01:13:16 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 3718D7Lu031066; Tue, 1 Aug 2023 10:13:07 +0200 Date: Tue, 1 Aug 2023 10:13:07 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Tan , Zhangjin Wu Subject: Re: [PATCH v2 06/10] selftests/nolibc: make functions static if possible Message-ID: References: <20230801-nolibc-warnings-v2-0-1ba5ca57bd9b@weissschuh.net> <20230801-nolibc-warnings-v2-6-1ba5ca57bd9b@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,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 Tue, Aug 01, 2023 at 09:34:18AM +0200, Thomas Wei?schuh wrote: > On 2023-08-01 08:52:19+0200, Willy Tarreau wrote: > > On Tue, Aug 01, 2023 at 07:30:13AM +0200, Thomas Wei?schuh wrote: > > > diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c > > > index 1555759bb164..53a3773c7790 100644 > > > --- a/tools/testing/selftests/nolibc/nolibc-test.c > > > +++ b/tools/testing/selftests/nolibc/nolibc-test.c > > > [..] > > > > /* prepare what needs to be prepared for pid 1 (stdio, /dev, /proc, etc) */ > > > -int prepare(void) > > > +static int prepare(void) > > > { > > > struct stat stat_buf; > > > > > > @@ -1208,7 +1208,7 @@ static const struct test test_names[] = { > > > { 0 } > > > }; > > > > For these ones it will prevent gcc from putting breakpoints there, which > > is counter-productive. > > Indeed. > > An alternative would be to add -g to CFLAGS (and remove -s from LDFLAGS). > This way we get full debugability including breakpoints for everything. It wouldn't change much because while it would allow the debugger to know where the function was possibly inlined, it's still not very convenient: you believe you're in a function but in fact you're in the caller. It really depends what you're debugging but here I don't see all that as providing a value, at least it brings more annoyance and little to no gain IMHO. > I didn't find the reasoning for -s in LDFLAGS. It's historic, because normally when you want small binaries you strip them, and the command line was reused as-is, but I agree that we could get rid of it! Willy