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=1796171106; b=tWGrCux3iDtbExLUFRGRm/OM65JvWq6MD0aPyBFrgfTGEv6Rn/KFFl09J3/HG2Bs1+eL kFzF7EyG990wc2oiBf+9tOcRisYHz0v13s5l0cbX1rt0Ir7p4t9AydNBkEPAfqeuZfDoy dutCQnQ7J2B739GBTxUXzr3sRRDGXGEEjR/k/Id60ZtLnM7dCVWiufj4N5/apm2jRsfeV VSq1ftU2uT0TQO53azqZKcIYhMqBf4EX4HUHuT81Uhn6S4F9YBC6xsPKOKh/N2NL56Fct i/4N/6lLDfm7K9fJay7qI9x8rKN14cLy9IejWOn7virLsU84KHwZwPh9zm3JHO990tQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796171106; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=0oPpP4ruNcv9O56+SiO8ZO8mCIG/FDBCiwiXEmD/rkY=; b=4KssDy9m+oU/gsxF0ed0N3rgds2J4p0FglDV/mcB4kz1yEyizEW5zx5LBNyZ4sybwCKU FWy2I0s9tQ6Ztxs6F4KYIDYarwSgELg7ZMmxbm93hB0IzxF8ZRZQifZGpqUMkYjPETI3Y HIQ8KYLbbmshz/0l3hCHGLcOwwLqkgDmu90IoGqYqnc/D7V13wP27IFLbC9d4Zx3zkEYl f7Zc2GBwcZ6Euuo+zHdTikv1qf1ZE81U9/LVpMlRylszeEasQMOQzrUtsNjXkjXfn11qs 4VRcOQBkbqMLo10MgbEMxefIwYtdlVB5W8yezjkFkxkUcE0yWusDNfA0dbwC1FYLgCQ== 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=T9f4C67l; 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 48239606A31A; Wed, 2 Dec 2026 00:25:05 +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=T9f4C67l Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F4A81F00893; Wed, 2 Dec 2026 00:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796171105; bh=0oPpP4ruNcv9O56+SiO8ZO8mCIG/FDBCiwiXEmD/rkY=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=T9f4C67l3lPHURg4rEgK+yQLD16XU5ygbQPABXhF9+N/Vq1PJxowdFulilbRFOFH6 bJ0bFJgg24sZseiBggol/Nd73Z8AmW+2IDNCIjFgOlxynfmGh9B7THqnuqv/rvos6m mwsBK0mhrXAEuBIKZrIpjLgava9XdpGHDlNzZwYZEfeN095+xp0WU3y7Glao9NA2Sw /teJT92klQHY4b0G+CuPpPa2bGxMEcjxi+b1V/Qj+TxsqQSYwHcSA5UyM1/gWM7BQO APea5PmqC12ru/PWPvcIH/GjH9+wCcCZLjtnvtMmRAbazybf3MEZSy0GxgpI3bY+WJ q19S0AE3DNAAw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH bpf-next v4 08/10] selftests/proc: Add KALLSYMS_QUERY_* ioctl tests Reply-To: sashiko-reviews@lists.linux.dev To: "Samuel Wu" Cc: bpf@vger.kernel.org, linux-modules@vger.kernel.org, "Petr Pavlu" In-Reply-To: <20261202001344.2721429-20-wusamuel@google.com> References: <20261202001344.2721429-12-wusamuel@google.com> <20261202001344.2721429-20-wusamuel@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 00:25:05 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] selftests/proc: main() bypasses kselftest reporting and harness helpers -- commit 0e501d59d9ac5550f786fe64742f3fdba1808123 Author: Samuel Wu selftests/proc: Add KALLSYMS_QUERY_* ioctl tests This commit adds a selftest for the KALLSYMS_QUERY_BY_NAME and KALLSYMS_QUERY_BY_ADDR ioctls on /proc/kallsyms, comparing their results against the parsed /proc/kallsyms text. > diff --git a/tools/testing/selftests/proc/proc-kallsyms-query.c b/tools/t= esting/selftests/proc/proc-kallsyms-query.c > new file mode 100644 > index 0000000000000..10c75a8ec457e > --- /dev/null > +++ b/tools/testing/selftests/proc/proc-kallsyms-query.c > @@ -0,0 +1,248 @@ [ ... ] > +int main(void) > +{ [ ... ] > + fd =3D open("/proc/kallsyms", O_RDONLY | O_CLOEXEC); > + if (fd < 0) > + ksft_exit_skip("open(/proc/kallsyms): %s\n", strerror(errno)); > + scan_text(); > + if (!ref.vfs_read_found) > + ksft_exit_skip("vfs_read is not in /proc/kallsyms\n"); > + > + /* Exact name in vmlinux, with name and module buffers */ > + sym =3D bufs(sizeof(name_buf), sizeof(mod_buf)); > + q =3D name_q("vfs_read", "vmlinux", &sym); > + err =3D by_name(fd, &q); > + if (err =3D=3D -ENOTTY) > + ksft_exit_skip("KALLSYMS_QUERY_BY_NAME is not supported\n"); > + if (!ref.vfs_read_addr) { > + qa =3D addr_q(0, &sym); > + assert(err =3D=3D -EPERM && by_addr(fd, &qa) =3D=3D -EPERM); > + ksft_exit_skip("kallsyms addresses are hidden\n"); > + } > + assert(!err); > + assert(sym.sym_addr =3D=3D ref.vfs_read_addr && sym.sym_size > 0); [ ... ] > + close(fd); > + return 0; > +} [Severity: Low] Could this test use kselftest_harness.h (FIXTURE() / TEST_F() with ASSERT_*() and EXPECT_*()) or report results through the kselftest.h wrappers (ksft_print_header(), ksft_set_plan(), ksft_test_result_*(), and ksft_finished()) instead of running sequential raw assert() checks in main() and exiting with a bare return 0? As written, passing runs emit no KTAP header, test plan, or result lines, and failures abort with SIGABRT instead of reporting a kselftest failure. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202001344.2721= 429-12-wusamuel@google.com?part=3D8