]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-35-LOGIN: Exclude manager entry in testcase_sanity_check()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 29 Apr 2024 14:06:54 +0000 (16:06 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 30 Apr 2024 20:10:05 +0000 (22:10 +0200)
Otherwise we try to kill the wrong session.

test/units/testsuite-35.sh

index 4ca312d6bab20949521ebb2742837a2c0ff0ec47..0f4b770de31053a9525c25502760e1aa73e33d9d 100755 (executable)
@@ -390,7 +390,7 @@ testcase_sanity_check() {
 
     # We're not in the same session scope, so in this case we need to specify
     # the session ID explicitly
-    session=$(loginctl --no-legend | awk '$3 == "logind-test-user" { print $1; exit; }')
+    session=$(loginctl --no-legend | grep -v manager | awk '$3 == "logind-test-user" { print $1; exit; }')
     loginctl kill-session --signal=SIGCONT "$session"
     # FIXME(?)
     #loginctl kill-session --signal=SIGCONT --kill-whom=leader "$session"