sysctl: Support systemd glob patterns

systemd-sysctl handles glob patterns along with overrides and
exceptions. Now the procps sysctl does it too.

The return value for sysctl is consistently either 0 or 1.

Added tests to check sysctl functions.

References:
 procps-ng/procps#191

Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
Craig Small
2021-09-13 22:07:37 +10:00
parent 8c23dfdcd4
commit 6389deca5b
5 changed files with 389 additions and 175 deletions

View File

@@ -136,6 +136,15 @@ proc expect_table_dsc { test match_header match_item } {
#}
}
proc expect_spawn_retval { test retval } {
foreach {pid spawnid os_error_flag value} [wait] break
if {$value == $retval} {
return
}
fail "$test (exit value)"
}
proc make_pipeproc { } {
global pipeproc_pid pipeproc_spawnid topdir