From d4c5b1cabd53b3ae5fc6f3606843e7e81c26879e Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Mon, 18 May 2020 11:11:31 -0500 Subject: [PATCH] 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 Reviewed-by: Zorro Lang Signed-off-by: Eryu Guan --- common/rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/rc b/common/rc index b25cad0e..62952036 100644 --- a/common/rc +++ b/common/rc @@ -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 ################################################################################ -- 2.30.2