| ce023757 | 21-Nov-2023 |
Joel Granados <[email protected]> |
sysclt: Clarify the results of selftest run
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. Capit
sysclt: Clarify the results of selftest run
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 <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
show more ...
|
| f2e7a626 | 16-Jun-2023 |
Joel Granados <[email protected]> |
test_sysclt: Test for registering a mount point
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
test_sysclt: Test for registering a mount point
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 <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
show more ...
|
| ec866cc6 | 16-Jun-2023 |
Joel Granados <[email protected]> |
test_sysctl: Add an option to prevent test skip
Tests were being skipped because the target was not present. Add a flag that controls whether to skip a test based on the presence of the target. Actu
test_sysctl: Add an option to prevent test skip
Tests were being skipped because the target was not present. Add a flag that controls whether to skip a test based on the presence of the target. Actually skip tests in the test_case function with a "return" instead of a "continue".
Signed-off-by: Joel Granados <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
show more ...
|
| 4f2f682d | 08-Jun-2020 |
Vlastimil Babka <[email protected]> |
lib/test_sysctl: support testing of sysctl. boot parameter
Testing is done by a new parameter debug.test_sysctl.boot_int which defaults to 0 and it's expected that the tester passes a boot parameter
lib/test_sysctl: support testing of sysctl. boot parameter
Testing is done by a new parameter debug.test_sysctl.boot_int which defaults to 0 and it's expected that the tester passes a boot parameter that sets it to 1. The test checks if it's set to 1.
To distinguish true failure from parameter not being set, the test checks /proc/cmdline for the expected parameter, and whether test_sysctl is built-in and not a module.
[[email protected]: skip the new test if boot_int sysctl is not present] Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Christian Brauner <[email protected]> Cc: David Rientjes <[email protected]> Cc: "Eric W . Biederman" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Guilherme G . Piccoli" <[email protected]> Cc: Iurii Zaikin <[email protected]> Cc: Ivan Teterevkov <[email protected]> Cc: Kees Cook <[email protected]> Cc: Luis Chamberlain <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
| 382561a0 | 28-May-2020 |
Masami Hiramatsu <[email protected]> |
selftests/sysctl: Make sysctl test driver as a module
Fix config file to require CONFIG_TEST_SYSCTL=m instead of y because this driver introduces a test sysctl interfaces which are normally not used
selftests/sysctl: Make sysctl test driver as a module
Fix config file to require CONFIG_TEST_SYSCTL=m instead of y because this driver introduces a test sysctl interfaces which are normally not used, and only used for the selftest.
Signed-off-by: Masami Hiramatsu <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Luis Chamberlain <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| 2ea622b8 | 14-May-2019 |
Eric Sandeen <[email protected]> |
tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case
The kernel has only two users of proc_do_large_bitmap(), the kernel CPU watchdog, and the ip_local_reserved_ports. Ref
tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case
The kernel has only two users of proc_do_large_bitmap(), the kernel CPU watchdog, and the ip_local_reserved_ports. Refer to watchdog_cpumask and ip_local_reserved_ports in Documentation for further details on these. When you input a large buffer into these, when it is larger than PAGE_SIZE- 1, the input data gets misparsed, and the user get incorrectly informed that the desired input value was set. This commit implements a test which mimics and exploits that use case, it uses a bitmap size, as in the watchdog case. The bitmap is used to test the bitmap proc handler, proc_do_large_bitmap().
The next commit fixes this issue.
[[email protected]: move proc_do_large_bitmap() export to EOF] [[email protected]: use new target description for backward compatibility] [[email protected]: augment test number to 50, ran into issues with bash string comparisons when testing up to 50 cases.] [[email protected]: introduce and use verify_diff_proc_file() to use diff] [[email protected]: use mktemp for tmp file] [[email protected]: merge shell test and C code] [[email protected]: commit log love] [[email protected]: export proc_do_large_bitmap() to allow for the test [[email protected]: check for the return value when writing to the proc file] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
| a0edef79 | 14-May-2019 |
Luis Chamberlain <[email protected]> |
tools/testing/selftests/sysctl/sysctl.sh: allow graceful use on older kernels
On old kernels older new test knobs implemented on the test_sysctl module may not be available. This is expected, and t
tools/testing/selftests/sysctl/sysctl.sh: allow graceful use on older kernels
On old kernels older new test knobs implemented on the test_sysctl module may not be available. This is expected, and the selftests test scripts should be able to run without failures on older kernels.
Generalize a solution so that we test for each required test target file for each test by requiring each test description to annotate their respective test target file. If the target file does not exist, we skip the test gracefully.
Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Luis Chamberlain <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Eric Sandeen <[email protected]> Cc: Eric Sandeen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
| 8ded3d10 | 14-May-2019 |
Luis Chamberlain <[email protected]> |
tools/testing/selftests/sysctl/sysctl.sh: ignore diff output on verify_diff_w()
When verify_diff_w() is used we care about the result, not the verbose output, and although we use -q, that still give
tools/testing/selftests/sysctl/sysctl.sh: ignore diff output on verify_diff_w()
When verify_diff_w() is used we care about the result, not the verbose output, and although we use -q, that still gives us a chatty message about if the files differ or not. Since verify_diff_w() uses stdinput the chatty message says whether or not "-" matches the target file, and this just seems rather odd. Better to just ignore that messsage all together, what we really care about i sthe results, the return value and we check for that.
Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Luis Chamberlain <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Eric Sandeen <[email protected]> Cc: Eric Sandeen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
| 2920fad3 | 12-Jul-2017 |
Luis R. Rodriguez <[email protected]> |
test_sysctl: add simple proc_douintvec() case
Test against a simple proc_douintvec() case. While at it, add a test against UINT_MAX. Make sure UINT_MAX works, and UINT_MAX+1 will fail and that neg
test_sysctl: add simple proc_douintvec() case
Test against a simple proc_douintvec() case. While at it, add a test against UINT_MAX. Make sure UINT_MAX works, and UINT_MAX+1 will fail and that negative values are not accepted.
Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Luis R. Rodriguez <[email protected]> Cc: Kees Cook <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|