fstests: add _require_sysctl_variable helper

New _require_sysctl_variable test to ensure that the sysctl we wish to
test is available on the system.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Eric Sandeen
2020-05-18 11:11:31 -05:00
committed by Eryu Guan
parent e2e468d4dd
commit d4c5b1cabd
+6
View File
@@ -4209,6 +4209,12 @@ _require_bsd_process_accounting()
$ACCTON_PROG off >> $seqres.full
}
_require_sysctl_variable()
{
local name=$1
sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
}
init_rc
################################################################################