Commit Graph

7 Commits

Author SHA1 Message Date
Craig Small
56db0bd32c build-sys: Update tests to new binary locations 2022-08-29 19:13:10 +10:00
Craig Small
b159c198c9 sysctl: print dotted keys again
When the globbing update was put into sysctl, you could no longer
simply use the keys because one key could potentially be
multiple paths once the glob expansion occured.  Using the path
instead gave a unique output.

Except certain programs, such as salt, expected the output to use
the dotted path "kernel.hostname" and not "kernel/hostname".

We can no longer use the original key, so now for each path:
  Copy the path
  strip off /proc/
  convert all / to .

The sysctl testsuite was also updated to check for a few different
types of conversion failures.

References:
 commit 6389deca5b
 https://www.freelists.org/post/procps/some-procpsn4400-fixes,4
 https://repo.saltproject.io/

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-04-09 14:18:28 +10:00
Craig Small
4706f225c9 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
2021-09-15 20:16:06 +10:00
Craig Small
6389deca5b 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>
2021-09-15 20:07:32 +10:00
Craig Small
db4455cfc9 testsuite: Add test for previous sysctl change
Add a check for path traversal to sysctl.

References:
 commit f25d462166

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2021-07-20 22:45:17 +10:00
Craig Small
532dc9239d Updated testsuite files for new NLS output 2012-01-02 17:39:41 +11:00
Craig Small
b36fe6efc5 Add sysctl check and tests to extra_dist 2011-11-28 22:02:27 +11:00