]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (lsfd) call ts_skip_nonroot earlier
authorMasatake YAMATO <yamato@redhat.com>
Wed, 8 Dec 2021 15:33:49 +0000 (00:33 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Thu, 9 Dec 2021 15:53:11 +0000 (00:53 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/ts/lsfd/column-kthread
tests/ts/lsfd/option-pid

index 3a1bf78ae5df517bf7592d0e0c462468e706a720..9fd10bf4c2d7e359ce7606a48a19fa77d36af56c 100755 (executable)
@@ -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"
 
index 5bd6b636623f7653b5569f4a278059c7196ac395..65365bf9e9524711632609780d9b062517a4198f 100755 (executable)
@@ -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=