automation: wait for the login prompt as test end marker

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>
This commit is contained in:
Marek Marczykowski-Górecki authored and Andrew Cooper committed 2023-04-27 21:48:12 +01:00
1 parent ac58d7fda6
commit 937e73feca
1 file changed
+2 -1
+2 -1
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.