mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 04:57:24 +07:00
d644437a1d
Sysctl test will fail in some items if the value of /proc/sys/kernel /sysctrl_writes_strict is 0 as the default value in kernel older than v4.5. Make this test more robus and compatible with older kernel by checking and update writes_strict value and restore it when test is done. Signed-off-by: Orson Zhai <orson.zhai@linaro.org> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Tested-by: Sumit Semwal <sumit.semwal@linaro.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
11 lines
142 B
Bash
Executable File
11 lines
142 B
Bash
Executable File
#!/bin/sh
|
|
|
|
SYSCTL="/proc/sys"
|
|
TARGET="${SYSCTL}/vm/swappiness"
|
|
ORIG=$(cat "${TARGET}")
|
|
TEST_STR=$(( $ORIG + 1 ))
|
|
|
|
. ./common_tests
|
|
|
|
exit_test
|