[OE-core] [PATCH 3/3] oeqa/runtime/cases/rpm.py: workaround race condition
ChenQi
Qi.Chen at windriver.com
Tue Jul 17 01:50:57 UTC 2018
I'll backport the patch, integrate it into the upgrade patch and send
out V6.
Best Regards,
Chen Qi
On 07/16/2018 07:15 PM, Burton, Ross wrote:
> Still refusing to accept a "sleep 1" on a race:
>
> 1) a 1 second sleep just makes the race rarer, a loaded host and
> you'll hit it again and want to push it to 2 seconds
> 2) Upstream fix at
> https://github.com/systemd/systemd/commit/86d18f3b09ec984ef3732567af992adb2dc77a8a
>
> Ross
>
> On 16 July 2018 at 04:20, Chen Qi <Qi.Chen at windriver.com> wrote:
>> With the recent change in new systemd version, it's possible that
>> a user is deleted before stopping user-runtime-dir at xxx.service.
>> 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 <Qi.Chen at windriver.com>
>> ---
>> 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 user-runtime-dir at 1000.service
>> + # 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
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list