Message ID | 7a0e3b0f6373ce9ad0bf66ddb1535ca9c4fed0fc.1682468126.git-series.marmarek@invisiblethingslab.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | automation: add PCI passthrough tests on x86 | expand |
On Wed, 26 Apr 2023, Marek Marczykowski-Górecki wrote: > The login prompt is printed after all the startup (test) scripts, wait > for that instead of "passed" marker. And only then check if test passed. > Before this patch there was a race: "passed" marker could be already > printed, but the final check would fail because login prompt wasn't > there yet. > > Also, modify etc/issue in domU rootfs to avoid confusing the one from > domU with the dom0's one. Use the dom0 one as test end marker. > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> > --- > changes in v2: > - differentiate dom0 and domU welcome message > --- > automation/scripts/qubes-x86-64.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh > index 916dbaae59c3..6c0309704661 100755 > --- a/automation/scripts/qubes-x86-64.sh > +++ b/automation/scripts/qubes-x86-64.sh > @@ -66,6 +66,7 @@ ${domU_check} > /bin/sh" > etc/local.d/xen.start > chmod +x etc/local.d/xen.start > echo "rc_verbose=yes" >> etc/rc.conf > +sed -i -e 's/^Welcome/domU \0/' etc/issue > find . | fakeroot -i ../fakeroot-save cpio -H newc -o | gzip > ../binaries/domU-rootfs.cpio.gz > cd .. > rm -rf rootfs > @@ -159,7 +160,7 @@ if [ -n "$wait_and_wakeup" ]; then > ssh $CONTROLLER wake > fi > > -until grep "$passed" smoke.serial || [ $timeout -le 0 ]; do > +until grep "^Welcome to Alpine Linux" smoke.serial || [ $timeout -le 0 ]; do > sleep 1; > : $((--timeout)) > done > -- > git-series 0.9.1 >
diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 916dbaae59c3..6c0309704661 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -66,6 +66,7 @@ ${domU_check} /bin/sh" > etc/local.d/xen.start chmod +x etc/local.d/xen.start echo "rc_verbose=yes" >> etc/rc.conf +sed -i -e 's/^Welcome/domU \0/' etc/issue find . | fakeroot -i ../fakeroot-save cpio -H newc -o | gzip > ../binaries/domU-rootfs.cpio.gz cd .. rm -rf rootfs @@ -159,7 +160,7 @@ if [ -n "$wait_and_wakeup" ]; then ssh $CONTROLLER wake fi -until grep "$passed" smoke.serial || [ $timeout -le 0 ]; do +until grep "^Welcome to Alpine Linux" smoke.serial || [ $timeout -le 0 ]; do sleep 1; : $((--timeout)) done
The login prompt is printed after all the startup (test) scripts, wait for that instead of "passed" marker. And only then check if test passed. Before this patch there was a race: "passed" marker could be already printed, but the final check would fail because login prompt wasn't there yet. Also, modify etc/issue in domU rootfs to avoid confusing the one from domU with the dom0's one. Use the dom0 one as test end marker. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> --- changes in v2: - differentiate dom0 and domU welcome message --- automation/scripts/qubes-x86-64.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)