On 07/11/2018 06:01 PM, Burton, Ross wrote:
Can we integrate the systemd fix, instead of working around it?

Ross

Hi Ross,

There's only a PR. And the PR is not merged yet.

I'll backport the patch if it's merged and drop this workaround.

Best Regards,
Chen Qi

On 11 July 2018 at 09:05, Chen Qi <[email protected]> wrote:
With the recent change in new systemd version, it's possible that
a user is deleted before stopping [email protected].
See link below.

   https://github.com/systemd/systemd/issues/9541

Workaround this issue by delay for 1 second before deleting user.

Signed-off-by: Chen Qi <[email protected]>
---
  meta/lib/oeqa/runtime/cases/rpm.py | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/meta/lib/oeqa/runtime/cases/rpm.py 
b/meta/lib/oeqa/runtime/cases/rpm.py
index 1e5e463..2f9dcad 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -87,6 +87,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
              self.assertEqual(status, 0, msg=msg)

          def unset_up_test_user(u):
+            # Due to recent change in systemd, we need to sleep for a while
+            # to avoid unexpected failure of [email protected]
+            # See https://github.com/systemd/systemd/issues/9541
+            if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
+                self.target.run('sleep 1')
+
              status, output = self.target.run('userdel -r %s' % u)
              msg = 'Failed to erase user: %s' % output
              self.assertTrue(status == 0, msg=msg)
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core


--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to