Skip to contentSkip to conversation

automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs

PATCH In review Michal Orzel 3 participants 3 messages Aug 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs

It was observed that smoke.serial file (used to store boot logs) is missing in artifacts of qemu based arm32 jobs. This is because the artifacts:paths listing smoke.serial specifies paths relative to the project directory but the qemu-smoke-dom0{less}-arm32.sh scripts create this file under binaries/. Fix it so that smoke.serial gets created in project directory just like for every other test job.

---
 automation/scripts/qemu-smoke-dom0-arm32.sh     | 8 +++++---
 automation/scripts/qemu-smoke-dom0less-arm32.sh | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)
automation/scripts/qemu-smoke-dom0-arm32.sh +5 -3
index 2c80df089f23..e6f303064a83 100755
@@ -2,6 +2,8 @@
 
 set -ex
 
+serial_log="$(pwd)/smoke.serial"
+
 cd binaries
 
 mkdir rootfs
@@ -74,7 +76,7 @@ rm -rf imagebuilder
 git clone https://gitlab.com/ViryaOS/imagebuilder
 bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config
 
-rm -f smoke.serial
+rm -f ${serial_log}
 set +e
 echo "  virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"| \
 timeout -k 1 720 \
@@ -89,8 +91,8 @@ timeout -k 1 720 \
    -no-reboot \
    -device virtio-net-pci,netdev=n0 \
    -netdev user,id=n0,tftp=./ \
-   -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee smoke.serial
+   -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee ${serial_log}
 
 set -e
-(grep -q "Domain-0" smoke.serial && grep -q "^/ #" smoke.serial) || exit 1
+(grep -q "Domain-0" ${serial_log} && grep -q "^/ #" ${serial_log}) || exit 1
 exit 0
automation/scripts/qemu-smoke-dom0less-arm32.sh +5 -3
index cc91238f4222..fb8f044a51f6 100755
@@ -7,6 +7,8 @@ test_variant=$1
 # Prompt to grep for to check if dom0 booted successfully
 dom0_prompt="^/ #"
 
+serial_log="$(pwd)/smoke.serial"
+
 cd binaries
 # Use the kernel from Debian
 curl --fail --silent --show-error --location --output vmlinuz https://deb.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/vmlinuz
@@ -120,7 +122,7 @@ git clone https://gitlab.com/ViryaOS/imagebuilder
 bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config
 
 # Run the test
-rm -f smoke.serial
+rm -f ${serial_log}
 set +e
 echo "  virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"| \
 timeout -k 1 240 \
@@ -135,8 +137,8 @@ timeout -k 1 240 \
     -no-reboot \
     -device virtio-net-pci,netdev=n0 \
     -netdev user,id=n0,tftp=./ \
-    -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee smoke.serial
+    -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee ${serial_log}
 
 set -e
-(grep -q "${dom0_prompt}" smoke.serial && grep -q "${passed}" smoke.serial) || exit 1
+(grep -q "${dom0_prompt}" ${serial_log} && grep -q "${passed}" ${serial_log}) || exit 1
 exit 0
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Michal Orzel

It was observed that smoke.serial file (used to store boot logs) is missing in artifacts of qemu based arm32 jobs. This is because the artifacts:paths listing smoke.serial specifies paths relative to the project directory but the qemu-smoke-dom0{less}-arm32.sh scripts create this file under binaries/. Fix it so that smoke.serial gets created in project directory just like for every other test job.

#2 lore raw
Quoted 9 lines · Luca Fancellu
Quoted 9 lines · Michal Orzel

It was observed that smoke.serial file (used to store boot logs) is missing in artifacts of qemu based arm32 jobs. This is because the artifacts:paths listing smoke.serial specifies paths relative to the project directory but the qemu-smoke-dom0{less}-arm32.sh scripts create this file under binaries/. Fix it so that smoke.serial gets created in project directory just like for every other test job.

Quoted 3 lines
Quoted 1 line