Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp223577lqb; Tue, 28 May 2024 13:39:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXT13oBCEClxNXGtzSv7AX3FWUpmaILMqGncrp+R29MqvBMuPXwYeprnF0Qc5k95nr1Cr4Tqm325u7jKOaghjXZEzM/hqVnkmbxJMmKg== X-Google-Smtp-Source: AGHT+IE3TBTpZ3cIombOTqAMNWCFC8L8EhvX9jtqSbEiaDue7meKGDZTVAWv1gSs4L/coxSAv/gH X-Received: by 2002:a2e:850c:0:b0:2e2:1e87:bbc7 with SMTP id 38308e7fff4ca-2e95b1cc7a0mr90675671fa.18.1716928792451; Tue, 28 May 2024 13:39:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716928792; cv=pass; d=google.com; s=arc-20160816; b=FIT77RettJFzW0OqOx+jXHsWBa/2UyvI4j9HRPNML1f/ooUi4iiwPOqAgi74Lk6/rL C4aNU+oavkAXJWfGtsITGuOkkBXb7SjILR9J3+wauTTdrmXR83V/xy+EmhpMjP+h9T4b qo8jmxtAD9WSDIkggjYXxQDfeP6/X3J/gwQUpDc6xcf+5Avzmo5Ij+POVBRuaDhApYDI KXzd/sEtspawUwz4hllgXygjGjtnsL1+VjdEa4pIwiKpvxD/qIvhuQMNSaG8eYmtoLf9 z2KqLuTB7of1Gp7zmyxAEOTOwfKIQC4PQxXu7ZXyf6DHu6PaT3K0vycqIQqQQuUxY2oE psJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=W97sNNoonBJCgCOwQPo5hHlpsxkYdZueW4Y282OPamM=; fh=lTwUxMmwotpY16fnUTQqVal6laA95WsqiMPb/Z8hKGE=; b=IM/9usMvHhR9FblA0bnEDHrLoT01uwFXJqnwjxQ1M8yN4YdKJaOk9MKJr9lyThDV6t gICaCF6fUP/adEo/gAO559IrPkKhl7evZ7cLiwE34pZ22mIYxV9ZwLLBz6Xz17xPceI2 yKkWv3FR8AUGugH23VSUdyMnxdvkMwlTBZOeyy16NOTYscWR5BfgRilGZE6fF3nuDzVg BdGCAPWLG6r4Ipv6cNf7RPinLq5GVsA182dDEMIx11uRZ3p/tQaqtacyXJszmEgguzuG jte9LQT9fZRlK9Ry8r/1t+jbKukJF7ZauF9zAioSt5/5H9XODKndrBPUw7ysMnL55ebo Mafw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gi3TfS6n; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785245f586si5529311a12.318.2024.05.28.13.39.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:39:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gi3TfS6n; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 071151F25E29 for ; Tue, 28 May 2024 20:39:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A5B1179675; Tue, 28 May 2024 20:39:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gi3TfS6n" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D22C178367; Tue, 28 May 2024 20:39:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716928785; cv=none; b=s8jORvo0CwIGwtxuHkZ9t0UGt2Sizs6olAupOUJuH1cxazbjJMrGe/MVUwKCdFW/JAMij1OxDChJxpGNwG39ZmDcp1TQ04QRCqjX+pnxwRrgWjqJ+Zmen+pPR7Y7Y33fI11dwS/gvTmxmfy8bxh33Noqc9vATk3b2+ITX1vdI7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716928785; c=relaxed/simple; bh=TYVTZRo5nmWuVil17NvbOhNOtCCN39UJ3GSfUpEf2Dk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FnwK5+LTwV0zGPZ6qLZRUNB4AfXFCuIE2TuM7XRxOaX4hEaP7Kd2/b79psgtWRhS3j0h8VWG1J/xs6cAs4tPZi/1jwwF6/1WdeNJFJz4FN/SSnZ801hX+Qea938XmTpSj0QlbUmXjF537JLmzfz4OI9XwiOZCG+YG9IXaJkXlWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gi3TfS6n; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FB83C4AF0B; Tue, 28 May 2024 20:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716928785; bh=TYVTZRo5nmWuVil17NvbOhNOtCCN39UJ3GSfUpEf2Dk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gi3TfS6nO9fVTFbBaL9hvY0iPBl28dMsspFOqKFZHE6fxs/jbXH6vXbqE4760N7YP yizxJJhNBN92oZIHHXx4PXWA2P2ZhLAAl7o3BKPb8uiEdQ5+t9wnPyMZie7FWaTOUb 98CkaLSTrhQ6/aEQxlQkOszM/yYY29E3BYvWhsyPs4LDnWAzqH8NfbkgHdY8JQKSaW EN2mOX+YtZPExFC1tjlTAIokrFRePZzTJjrUbeNjvVf86S6rINQ8EnuHMtByvEgPMC uL7C8Cj/HMMaf7n9TMijwN8XV72lZbFsfLaW0atfAkv9fAKeWhdESHogO3oqcXpoTJ w1tdlHjnhNCvw== Date: Tue, 28 May 2024 13:39:41 -0700 From: Nathan Chancellor To: John Hubbard Cc: Shuah Khan , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Klassert , Herbert Xu , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , Matthieu Baerts , Mat Martineau , Geliang Tang , Pravin B Shelar , Willem de Bruijn , Alexander Mikhalitsyn , zhujun2 , Petr Machata , Ido Schimmel , Hangbin Liu , Nikolay Aleksandrov , Benjamin Poirier , Sebastian Andrzej Siewior , Dmitry Safonov <0x7f454c46@gmail.com>, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, mptcp@lists.linux.dev, dev@openvswitch.org, Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev Subject: Re: [PATCH v2] selftests/net: suppress clang's "variable-sized type not at the end" warning Message-ID: <20240528203941.GD2680415@thelio-3990X> References: <20240527213641.299458-1-jhubbard@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240527213641.299458-1-jhubbard@nvidia.com> On Mon, May 27, 2024 at 02:36:41PM -0700, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns that "a variable sized type not at the end of a struct or > class is a GNU extension". > > These cases are not easily changed, because they involve structs that > are part of the API. Fortunately, however, the tests seem to be doing > just fine (specifically, neither affected test runs any differently with > gcc vs. clang builds, on my test system) regardless of the warning. So, > all the warning is doing is preventing a clean build of selftests/net. > > Fix this by suppressing this particular clang warning for the > selftests/net suite. > > Signed-off-by: John Hubbard > --- > > Changes since the first version: > > 1) Rebased onto Linux 6.10-rc1 > > thanks, > John Hubbard > > > tools/testing/selftests/net/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile > index bd01e4a0be2c..9a3b766c8781 100644 > --- a/tools/testing/selftests/net/Makefile > +++ b/tools/testing/selftests/net/Makefile > @@ -6,6 +6,10 @@ CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES) > # Additional include paths needed by kselftest.h > CFLAGS += -I../ > > +ifneq ($(LLVM),) > + CFLAGS += -Wno-gnu-variable-sized-type-not-at-end For what it's worth, the main kernel has -Wno-gnu because there is little point in warning about the use of GNU extensions when building with '-std=gnu...'. It may be worth doing this anywhere that uses a GNU standard in the selftests but I guess it depends on how noisy things are. > +endif > + > TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh \ > rtnetlink.sh xfrm_policy.sh test_blackhole_dev.sh > TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh ip_defrag.sh > > base-commit: 2bfcfd584ff5ccc8bb7acde19b42570414bf880b > -- > 2.45.1 > >