[OE-core] [PATCH 0/4] Systemd Upgrade
Khem Raj
raj.khem at gmail.com
Tue Sep 8 18:09:46 UTC 2015
On Mon, Sep 7, 2015 at 12:26 PM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> On Sun, 2015-09-06 at 15:25 +0000, Khem Raj wrote:
>> Changes Since last time
>> - Now that 225 is out upgrade recipe to 225, changes between 224 and 225 are minor
>> but fixes in networkd are important
>> - Implement systemd-sysv-install for OE
>> - Enable getopt in busybox needed for systemd-sysv-install
>> - Remove update-rc.d from default uninstall list in rootfs creation
>> - Tested date and systemd unit tests manually to pass
>> - Booted core-image-cmdline-full on all qemu targets
>
> https://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/480
>
> The date test failed in two of the sanity runs with this series
> applied :(
I am able to reproduce this now and also analyse it. Its a timing
issue and original testcase needs to be changed.
The root cause is that we have systemd-timesyncd started automatically on boot
( we always had) so when we changed the date and asked for the date
immediately we got it before timesyncd came around
and readjusted it to network time.
happens with
SSH="ssh root at 192.168.7.2"
$SSH 'date +"%Y-%m-%d %T"'
$SSH 'date -s "2016-08-09 10:00:00"'
$SSH 'date -R'
Fixed with
SSH="ssh root at 192.168.7.2"
$SSH 'systemctl stop systemd-timesyncd'
$SSH 'date +"%Y-%m-%d %T"'
$SSH 'date -s "2016-08-09 10:00:00"'
$SSH 'date -R'
$SSH 'systemctl start systemd-timesyncd'
this patch fixed it during autoruns, but date test is common for
sysvint and systemd it ignores the outputs of systemctl cmds
so in theory it will work on both sysvinit and systemd. Although its not elegant
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index 97e8ee4..f73ad1c 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -7,6 +7,7 @@ class DateTest(oeRuntimeTest):
@testcase(211)
@skipUnlessPassed("test_ssh")
def test_date(self):
+ (status, output) = self.target.run('systemctl stop systemd-timesyncd')
(status, output) = self.target.run('date +"%Y-%m-%d %T"')
self.assertEqual(status, 0, msg="Failed to get initial date,
output: %s" % output)
oldDate = output
@@ -21,3 +22,4 @@ class DateTest(oeRuntimeTest):
(status, output) = self.target.run('date -s "%s"' % oldDate)
self.assertEqual(status, 0, msg="Failed to reset date, output:
%s" % output)
+ (status, output) = self.target.run('systemctl start systemd-timesyncd')
>
> Cheers,
>
> Richard
>
More information about the Openembedded-core
mailing list