From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796339537; b=EBqCa4R/+fJAle/DAKI6DpTwDOcjcqoFdKOnFGlZkt05xZofWH/L0ZhTcoAVa8g0BAAd 259pNQHvr2APXBLY3goYbGDUm9eE0NfgxVUw5EtXCTuZIc5J0UCwcgFzvC0inqWR6Bwt2 Kvit2zgIzE/waA9fRS936v+lGkWInzTB2mI21uQK7J0lgd3oFyyDpsCpDWXA3k+Iq9VPT txcWAepiqsbZTQTk0N9Fwi20caXJePzasCN4adNqKz2vF98LgduedPEB0Lt/eu/B7XAm9 9P4buuxCx+MTc5Zgx+qDgp2qR+wKofcwhSCX+P6Mx7r/osPfYOoHFTIFOxgP7/wW5VA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796339537; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=DRL5Gq5cf7j2cjIGHMeyIRhbV9uJ8NnHLyk4GvCsC+M=; b=uCOZaB0GYBruAnSuKFUJ8DpBzdK1G0ZOtvW69/dZByBdUxDvFmnwgbqbKFV7eZTdZ6X/ 5GbiHpZeiZgPs7ok7RiuoymtvivQAZWTlGFFUizAQHF8uw9bNzNdNapwqXgP/H2OkLda4 fdEnDq11vHnnTRJEp7tza1vPiyMTYWqsJyKiN3YKh/nKnL6SoKLh9K5LT3k8Rq5JAwtc3 DgytIanzRuEet3xjhLC8ffeM60ivf41vquE/p9fmre0siWBNzSWJllXTjp77Q/sl3idg0 ZyK+DiqZWtEwfRsZJkeggZb/q6oKX9XZAZ5hm5OxQvWUeAecTJN2oK040YbSL8qNZIg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QuECTKF1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E4BB606A322; Thu, 3 Dec 2026 23:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QuECTKF1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36AFD1F000C2; Thu, 3 Dec 2026 23:12:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796339536; bh=DRL5Gq5cf7j2cjIGHMeyIRhbV9uJ8NnHLyk4GvCsC+M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=QuECTKF1RugZ49Sg7vAdRcGtMVzmN8PlUZTohOduBCuEiYrrhHhhxZrWHzRgp9SIw V6rlMpC33m+YFybHbmkS+zyigkoI2cAXGrfOT1npBRW207Ge58ivhgMaHzo9Z/8KZL 4sFO1JtwXO9HvHAlNsw66ZN2i8x6jEIN3pFVqhIg9M7Niw9ghddpwHP95U2GWurxHs sk6HYinb391dTq57S1KzB+BV0v5jEuJSEqO5wLV7xKNnwruNHxn5LOFQr2R4HYWWbo QTmzvfTsaGGhph6zvtR7Wj5SDcvD6VYQfUROdGkipgdEwIHyXPeV3oY1XjlSZyWlRi zjEducSNCxi+w== Subject: Re: [PATCH net-next 02/23] selftests: can: add J1939 test helper header and library From: netdev-bot+sashiko@kernel.org To: mkl@pengutronix.de Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org, kernel@pengutronix.de, s.grosjean@peak-system.fr, stable@vger.kernel.org Date: Thu, 03 Dec 2026 23:12:15 +0000 Message-ID: <179633953573.3146.8765255233108616500@kernel.org> In-Reply-To: <20261202230853.2665144-3-mkl@pengutronix.de> References: <20261202230853.2665144-3-mkl@pengutronix.de> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] j1939_gw.c can fail to build because nothing it includes defines static_assert(). -- selftests: can: add J1939 test helper header and library This commit adds shared code for the upcoming J1939 selftests: C helpers in j1939_helpers.c/h, kselftest harness glue in j1939_tests.h, and a j1939_lib.sh runner that sets up vcan interfaces. It also adds a small j1939_gw tool that installs CAN gateway rules between the J1939 vcan and the CAN_RAW peer's vcan. Link: https://patch.msgid.link/20261130-j1939-selftests-v7-2-2491693ccb8d@pengutronix.de > diff --git a/tools/testing/selftests/net/can/Makefile b/tools/testing/selftests/net/can/Makefile > index 3adaa13dcbfa3..cf0b06974d546 100644 > --- a/tools/testing/selftests/net/can/Makefile > +++ b/tools/testing/selftests/net/can/Makefile > @@ -2,12 +2,16 @@ > > top_srcdir = ../../../../.. > > -CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES) > +CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include -I$(top_srcdir)/tools/include $(KHDR_INCLUDES) [ ... ] > diff --git a/tools/testing/selftests/net/can/j1939_gw.c b/tools/testing/selftests/net/can/j1939_gw.c > new file mode 100644 > index 0000000000000..4018432add9a2 > --- /dev/null > +++ b/tools/testing/selftests/net/can/j1939_gw.c [ ... ] > +#include > +#include > +#include > +#include > +#include > + > +/* an RTM_NEWROUTE request for a CAN->CAN rule, see net/can/gw.c */ > +struct cgw_req { [ ... ] > +static_assert(offsetof(struct cgw_req, src_attr) == > + NLMSG_SPACE(sizeof(struct rtcanmsg)), > + "the attributes must follow the aligned rtcanmsg"); > +static_assert(offsetof(struct cgw_req, dst_attr) == > + offsetof(struct cgw_req, src_attr) + RTA_SPACE(sizeof(__u32)), > + "the attributes must be packed as netlink aligns them"); [Severity: Medium] Which header defines static_assert for j1939_gw.c? The only candidate is , which is presumably meant to resolve to tools/include/linux/kernel.h. That file pulls in and . The Makefile puts -I$(top_srcdir)/usr/include ahead of -I$(top_srcdir)/tools/include. After make headers, which is the usual step before an in-tree selftest build, usr/include/linux/kernel.h exists. It is the installed include/uapi/linux/kernel.h, and it only includes and . That means the uAPI header shadows the tools one. None of the other headers included here pulls in . GCC 14 and earlier default to gnu17, where static_assert is not a keyword, so these two file-scope static_assert() lines fail to compile. j1939_helpers.h is not affected because it includes directly, and that header has no uAPI counterpart. j1939_gw is in TEST_GEN_FILES, so a compile failure here also stops the existing test_raw_filter target from building in net/can. Later patches in the series do not change this include list or the Makefile include order. Could j1939_gw.c include or directly? Moving tools/include ahead of usr/include would also fix it. > + > +/* Add a rule from src to dst; return 0 or a negative errno. */ > +static int cgw_add(int nl, unsigned int src, unsigned int dst) [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202230853.2665144-2-mkl%40pengutronix.de