]> git.karo-electronics.de Git - karo-tx-linux.git/commit
test_sysctl: test against PAGE_SIZE for int
authorLuis R. Rodriguez <mcgrof@kernel.org>
Wed, 12 Jul 2017 21:33:49 +0000 (14:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Jul 2017 23:26:00 +0000 (16:26 -0700)
commit1c0357c846452add7c2c863ec372010e3d2ca943
tree20387dba1922a192bd15663c5e54fee9c7a1fed7
parent64b671204afd71591e774e7237b7c862ac5bbd97
test_sysctl: test against PAGE_SIZE for int

Add the following tests to ensure we do not regress:

  o Test using a buffer full of space (PAGE_SIZE-1) followed by a
    single digit works

  o Test using a buffer full of spaces (PAGE_SIZE or over) will fail

As tests increase instead of unloading the module and reloading it we
can just do a shell reset_vals() with a reset to values we know are set
at init on the driver.

Link: http://lkml.kernel.org/r/20170630224431.17374-4-mcgrof@kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/sysctl/sysctl.sh