diff options
author | Craig Small <csmall@dropbear.xyz> | 2021-09-15 20:16:06 +1000 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2021-09-15 20:16:06 +1000 |
commit | 4706f225c996d5ecba64bdbc1481ab2512ae2770 (patch) | |
tree | a168b0f7e1738611729110f6fd0fdfc9468a508d | |
parent | 2a7c909a1b2b35603dcfe7b39ce9dc809ee2d8be (diff) | |
download | procps-ng-4706f225c996d5ecba64bdbc1481ab2512ae2770.tar.gz |
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 f25d462166f80b844d33dad3e4c06088c809a426
-rw-r--r-- | testsuite/sysctl.test/sysctl_write.exp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/sysctl.test/sysctl_write.exp b/testsuite/sysctl.test/sysctl_write.exp index 5a74dec..bf0923f 100644 --- a/testsuite/sysctl.test/sysctl_write.exp +++ b/testsuite/sysctl.test/sysctl_write.exp @@ -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" |