From: Masatake YAMATO Date: Wed, 8 Dec 2021 15:33:49 +0000 (+0900) Subject: tests: (lsfd) call ts_skip_nonroot earlier X-Git-Tag: v2.38-rc1~96^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe66c5334d10d0ee527dccc1160f7924205802da;p=thirdparty%2Futil-linux.git tests: (lsfd) call ts_skip_nonroot earlier Signed-off-by: Masatake YAMATO --- diff --git a/tests/ts/lsfd/column-kthread b/tests/ts/lsfd/column-kthread index 3a1bf78ae5..9fd10bf4c2 100755 --- a/tests/ts/lsfd/column-kthread +++ b/tests/ts/lsfd/column-kthread @@ -20,12 +20,11 @@ TS_DESC="kthread column" . $TS_TOPDIR/functions.sh ts_init "$*" +ts_skip_nonroot ts_check_test_command "$TS_CMD_LSFD" ts_check_prog "ps" -ts_skip_nonroot - [ "$(ps --no-headers -o comm 1)" = 'systemd' ] || ts_skip "pid 1 is not systemd" [ "$(ps --no-headers -o comm 2)" = 'kthreadd' ] || ts_skip "pid 2 is not kthreadd" diff --git a/tests/ts/lsfd/option-pid b/tests/ts/lsfd/option-pid index 5bd6b63662..65365bf9e9 100755 --- a/tests/ts/lsfd/option-pid +++ b/tests/ts/lsfd/option-pid @@ -19,6 +19,7 @@ TS_DESC="--pid option" . $TS_TOPDIR/functions.sh ts_init "$*" +ts_skip_nonroot ts_check_test_command "$TS_CMD_LSFD" ts_check_test_command "$TS_HELPER_MKFDS" @@ -26,8 +27,6 @@ ts_check_prog "ps" ts_cd "$TS_OUTDIR" -ts_skip_nonroot - [ "$(ps --no-headers -o comm 1)" = 'systemd' ] || ts_skip "pid 1 is not systemd" PID=