Skip to content

lib: Fix OTA update test failures

Frederic Danis requested to merge wip/fdanis/7252 into apertis/v2021dev3

aum-ota-signed test fails with the following traces:

+ testname=test-sign-no_signature
+ apply_update_sync -o
+ local RESULT=1
+ date +%Y-%m-%d %H:%M:%S
+ local BEFORE_UP_DATE=2020-07-14 08:02:30

Jul 14 08:02:40 apertis apertis-update-[667]: Ostree upgrade failed: Can't verify commit: signature: ed25519: no keys loaded: signed with unknown key
+ journalctl --since 2020-07-14 08:02:30 --unit apertis-update-manager
+ grep -qE Ostree already up to date
+ journalctl --since 2020-07-14 08:02:30 --unit apertis-update-manager
+ grep -qE Ostree upgrade failed
+ echo update failed
update failed

+ echo test-sign-no_signature: pass
test-sign-no_signature: pass
+ testname=test-sign-update
+ mkdir -p /etc/ostree/trusted.ed25519.d
+ cp -av apertis.ed25519 /etc/ostree/trusted.ed25519.d/
`apertis.ed25519' -> `/etc/ostree/trusted.ed25519.d/apertis.ed25519'
+ apply_update_sync -o
+ local RESULT=1
+ date +%Y-%m-%d %H:%M:%S
+ local BEFORE_UP_DATE=2020-07-14 08:02:40
+ + grep -qE Ostree already up to datejournalctl
 --since 2020-07-14 08:02:40 --unit apertis-update-manager
+ + journalctl --since 2020-07-14 08:02:40 --unit apertis-update-manager
grep -qE Ostree upgrade failed
+ echo update failed
update failed
+ RESULT=1
+ break
+ kill 707
+ kill 701
+ return 1
+ error_occured
+ set +x
Job for generated-test-case-offline-upgrade.service failed because the control process exited with error code.
See \"systemctl status generated-test-case-offline-upgrade.service\" and \"journalctl -xe\" for details.
Command exited with non-zero status 1
real	0m 16.77s
user	0m 0.03s
sys	0m 0.02s
<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=offline-upgrade RESULT=fail>

When apply_update_sync is called multiple time too quickly it can see messages from previous call and base its result on them.

Signed-off-by: Frédéric Danis frederic.danis@collabora.com

Merge request reports