]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/runtime/rpm: ensure no user process running before deleting user
authorChen Qi <Qi.Chen@windriver.com>
Fri, 12 Jul 2019 08:55:27 +0000 (16:55 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Jul 2019 08:28:37 +0000 (09:28 +0100)
commit9d398be42a69d25277b929d760aaed1679f3cd54
tree32781b630199a468b0d4eb69f2c3e10873804b8a
parent4e303063db731feae192314bab2ca16d26192dbb
oeqa/runtime/rpm: ensure no user process running before deleting user

In case of systemd, `su -c 'xxx' test1' via ssh will create
several processes owned by test1, e.g. /lib/system/systemd --user.

These processes are actually managed by user@UID.service
(e.g. user@1000.service). And such service is managed
automatically by systemd. In other words, it will be cleaned
up by systemd automatically.

So we need to wait for systemd to clean it up before trying to
use `userdel' to delete the user.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/rpm.py