<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/tools/testing/selftests/sysctl, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-09-25T12:00:00+00:00</updated>
<entry>
<title>selftests: sysctl: Check the sign of a negative jiffies read</title>
<updated>2026-09-25T12:00:00+00:00</updated>
<author>
<name>Zhan Xusheng</name>
<email>zhanxusheng1024@gmail.com</email>
</author>
<published>2026-09-23T14:49:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=7b08e5851884e4ad207a6401b1dcffdb03d43c28'/>
<id>urn:sha1:7b08e5851884e4ad207a6401b1dcffdb03d43c28</id>
<content type='text'>
proc_int_k2u_conv_kop() returns the sign through *negp and the magnitude
through *u_ptr.  For a negative value it used to convert the
sign-extended int and negate afterwards, so the magnitude came back as a
wrapped 64-bit number.  Nothing noticed, because no test wrote a
negative value to a jiffies sysctl.

Write one to each of the three int converters and require the value to
read back unchanged.  Each value is chosen to convert exactly at every
CONFIG_HZ, so the test does not depend on it:

	converter		write	jiffies stored	reads back
	jiffies			-1	-HZ		-1
	ms_jiffies		-1000	-HZ		-1000
	userhz_jiffies		-100	-HZ		-100

On a kernel without the fix, at CONFIG_HZ=250:

  # int_jiffies: got '-18372957097414713411', want '-1'
  # int_ms_jiffies: got '-18446744069414585320', want '-1000'
  # int_userhz_jiffies: got '-18446742229035144346', want '-100'
  not ok 1 test_int_jiffies_negative

(paths shortened; the runner prints them under /proc/sys/debug/test_sysctl)

Signed-off-by: Zhan Xusheng &lt;zhanxusheng@xiaomi.com&gt;
Reviewed-by: Bradley Morgan &lt;brads@mainlining.org&gt;
Tested-by: Bradley Morgan &lt;brads@mainlining.org&gt;
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>sysctl: Rewrite selftests on top of KTAP helpers</title>
<updated>2026-09-23T13:22:55+00:00</updated>
<author>
<name>Joel Granados</name>
<email>joel.granados@kernel.org</email>
</author>
<published>2026-09-14T12:40:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ccb5bf46e31cef31d0ed1957b1fd3dbf8c774243'/>
<id>urn:sha1:ccb5bf46e31cef31d0ed1957b1fd3dbf8c774243</id>
<content type='text'>
Use kselftest/ktap_helpers.sh so that each test reports its own KTAP
result. A failure names the test but continues with the rest of the
suite. Tests are functions prefixed by "test_", they run in a subshell
and do not leak state to other tests. Sysctl test assertions (assert*)
emit a KTAP diagnostic and return a status, never exit.

The sysctl selftests arguments are:
    -r N          repeat selected tests N times (default 1)
    -l            list discovered tests
    -t T          space separated tests list. For example "test_1 test_2"
    -s N          base seed for the randomized bitmap iterations.
    -h, --help    help

It is a single commit to avoid intermediate states where the runner
exists with no tests or where scaffolding is added only to be deleted
later in the same series. Neither bisects usefully.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>sysctl: Add 0013 to test partially updated vectors</title>
<updated>2026-09-10T12:52:15+00:00</updated>
<author>
<name>Joel Granados</name>
<email>joel.granados@kernel.org</email>
</author>
<published>2026-08-13T06:39:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=1da0344016a7094ced23dce104a93af535e8ba83'/>
<id>urn:sha1:1da0344016a7094ced23dce104a93af535e8ba83</id>
<content type='text'>
Add coverage for partially updated sysctl vectors with test 0013. It
makes sure that the sysctl vector is unchanged when one of the elements
is not valid.

Reviewed-by: Bradley Morgan &lt;include@grrlz.net&gt;
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>sysctl: Nixify sysctl.sh</title>
<updated>2025-07-23T09:56:02+00:00</updated>
<author>
<name>Joel Granados</name>
<email>joel.granados@kernel.org</email>
</author>
<published>2025-06-26T12:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=02b072fd9fe1c5e16b7ae8da2f4ae31c8ef6f6a3'/>
<id>urn:sha1:02b072fd9fe1c5e16b7ae8da2f4ae31c8ef6f6a3</id>
<content type='text'>
Use "#!/usr/bin/env bash" instead of "#!/bin/bash". Needed for testing
in nix environments as they only provide /usr/bin/env at the standard
location.

Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>sysctl: Add 0012 to test the u8 range check</title>
<updated>2025-04-14T12:13:41+00:00</updated>
<author>
<name>Joel Granados</name>
<email>joel.granados@kernel.org</email>
</author>
<published>2025-03-21T08:44:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=8e4acabdc8691529c163c18a45bcdd332bd75145'/>
<id>urn:sha1:8e4acabdc8691529c163c18a45bcdd332bd75145</id>
<content type='text'>
Add a sysctl test that uses the new u8 test ctl files in a created by
the sysctl test module. Check that the u8 proc file that is valid is
created and that there are two messages in dmesg for the files that were
out of range.

Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/sysctl: fix wording of help messages</title>
<updated>2025-02-27T09:02:12+00:00</updated>
<author>
<name>Bharadwaj Raju</name>
<email>bharadwaj.raju777@gmail.com</email>
</author>
<published>2025-02-21T10:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=29fa7d7934216e0a93102a930ef28e2a6ae852b1'/>
<id>urn:sha1:29fa7d7934216e0a93102a930ef28e2a6ae852b1</id>
<content type='text'>
Change wording of test number recommendation to "the recommended number
of times".

Signed-off-by: Bharadwaj Raju &lt;bharadwaj.raju777@gmail.com&gt;
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: fix spelling/grammar errors in sysctl/sysctl.sh</title>
<updated>2025-02-21T08:27:04+00:00</updated>
<author>
<name>Chandra Pratap</name>
<email>chandrapratap3519@gmail.com</email>
</author>
<published>2025-01-28T10:36:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ae9ebda1bc32b865b895d5331a00f24f8fd324e6'/>
<id>urn:sha1:ae9ebda1bc32b865b895d5331a00f24f8fd324e6</id>
<content type='text'>
Fix the grammatical/spelling errors in sysctl/sysctl.sh.
This fixes all errors pointed out by codespell in the file.

Signed-off-by: Chandra Pratap &lt;chandrapratap3519@gmail.com&gt;
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>sysclt: Clarify the results of selftest run</title>
<updated>2023-12-28T12:57:57+00:00</updated>
<author>
<name>Joel Granados</name>
<email>j.granados@samsung.com</email>
</author>
<published>2023-11-21T11:02:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ce023757845d5bee95094fe1de948a949f52c0e4'/>
<id>urn:sha1:ce023757845d5bee95094fe1de948a949f52c0e4</id>
<content type='text'>
In some cases the result of test were hidden inside the stdout and it
was difficult to identify when a test was skipped and why.

List of changes
1. Capitalize all the words that express a test result : "OK", "SKIPPED"
   and "FAIL".
2. Place all test result text at the end of the message. This will
   prevent the result from being hidden when stdout is verbose.
3. Any other explanation that comes after the result text will be placed
   in a new line.
4. All failures are marked as "FAIL"
5. Pipped the failure to stderr in tests 8, 9, 10.
6. Replaced bogus "FAIL" with "SKIPPED" in test 0007
7. All "..." are prefixed and followed by a space.

Signed-off-by: Joel Granados &lt;j.granados@samsung.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
</entry>
<entry>
<title>sysctl: Add a selftest for handling empty dirs</title>
<updated>2023-12-28T12:57:57+00:00</updated>
<author>
<name>Joel Granados</name>
<email>j.granados@samsung.com</email>
</author>
<published>2023-11-21T11:02:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=777740779ec5bd05eac85d9bbbb6b11457cfd238'/>
<id>urn:sha1:777740779ec5bd05eac85d9bbbb6b11457cfd238</id>
<content type='text'>
Basic test to ensure that empty directories can be registered and that
they in turn can serve as a base dir for other registrations.

Add one test to the sysctl selftest module. It first registers an empty
directory under "empty_add" and then uses that as a base to register
another empty dir.
The sysctl bash script then checks that "empty_add" is present and that
there an empty directory within it.

Signed-off-by: Joel Granados &lt;j.granados@samsung.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
</entry>
<entry>
<title>test_sysclt: Test for registering a mount point</title>
<updated>2023-06-18T09:32:54+00:00</updated>
<author>
<name>Joel Granados</name>
<email>j.granados@samsung.com</email>
</author>
<published>2023-06-16T08:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=f2e7a6265e5a5e02ee663eda3d0527dd8230b832'/>
<id>urn:sha1:f2e7a6265e5a5e02ee663eda3d0527dd8230b832</id>
<content type='text'>
Test that target gets created by register_sysctl_mount_point and that no
additional target can be created "on top" of a permanently empty sysctl
table.

Create a mount point target (mnt) in the sysctl test driver; try to
create another on top of that (mnt_error). Output an error if
"mnt_error" is present when we run the sysctl selftests.

Signed-off-by: Joel Granados &lt;j.granados@samsung.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
</entry>
</feed>
