testsuite: Add sysctl test for directory checks

Adds a test to try to write a sysctl parameter above /proc
and passes if it gives an error message.

References:
 commit f25d462166
This commit is contained in:
Craig Small 2021-09-15 20:16:06 +10:00
parent 2a7c909a1b
commit 4706f225c9

View File

@ -27,3 +27,7 @@ if {[file exists ${hostname_file}]} {
} else {
unsupported "sysctl write: hostname file doe not exist"
}
set test "sysctl write above /proc"
spawn $sysctl /../../../etc=1
expect_pass "$test" "sysctl: Path is not under /proc/sys/: /proc/sys//../../../etc"