mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] sysctl: Cover the jiffies converters in the selftests
@ 2026-09-23 14:49 Zhan Xusheng
  2026-09-23 14:49 ` [PATCH 1/2] sysctl: Add jiffies converter entries to the test module Zhan Xusheng
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Zhan Xusheng @ 2026-09-23 14:49 UTC (permalink / raw)
  To: Joel Granados
  Cc: Zhan Xusheng, Kees Cook, Shuah Khan, Kuniyuki Iwashima,
	Bradley Morgan, linux-kernel, linux-fsdevel, linux-kselftest

Joel asked for a test for the negative read path fixed by

	https://lore.kernel.org/r/20260922031229.2300283-2-zhanxusheng@xiaomi.com

These apply on sysctl-next and depend on that fix; without it 2/2 fails,
which is the point.

While writing the test I noticed that fix's changelog is incomplete: it
names proc_dointvec_jiffies() and proc_dointvec_ms_jiffies(), but
proc_dointvec_userhz_jiffies() goes through the same
proc_int_k2u_conv_kop() and is affected too.  Measured on
net/ipv4/neigh/default/retrans_time at CONFIG_HZ=250, unpatched:

  # echo -1 > /proc/sys/net/ipv4/neigh/default/retrans_time
  # cat /proc/sys/net/ipv4/neigh/default/retrans_time
  -18446742229035144246

I will correct that in the respin.

Tested in qemu at CONFIG_HZ=250 with CONFIG_TEST_SYSCTL=y, and built as
=m.  2/2 reports "not ok" without the fix and "ok" with it, and the
pass/fail counts of the other tests are unchanged either way.

Zhan Xusheng (2):
  sysctl: Add jiffies converter entries to the test module
  selftests: sysctl: Check the sign of a negative jiffies read

 lib/test_sysctl.c                        | 31 ++++++++++++++++++++++++
 tools/testing/selftests/sysctl/sysctl.sh | 23 ++++++++++++++++++
 2 files changed, 54 insertions(+)


base-commit: c5c4ca25387e3cefd1af64edf9187546b6d06787
-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-25 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 14:49 [PATCH 0/2] sysctl: Cover the jiffies converters in the selftests Zhan Xusheng
2026-09-23 14:49 ` [PATCH 1/2] sysctl: Add jiffies converter entries to the test module Zhan Xusheng
2026-09-23 15:53   ` Bradley Morgan
2026-09-23 14:49 ` [PATCH 2/2] selftests: sysctl: Check the sign of a negative jiffies read Zhan Xusheng
2026-09-23 15:53   ` Bradley Morgan
2026-09-25 11:45     ` Joel Granados
2026-09-25 15:03       ` Bradley Morgan
2026-09-25 11:41 ` [PATCH 0/2] sysctl: Cover the jiffies converters in the selftests Joel Granados

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®