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

Michal Orzel posted 1 patch 8 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230808085059.13112-1-michal.orzel@amd.com
automation/scripts/qemu-smoke-dom0-arm32.sh     | 8 +++++---
automation/scripts/qemu-smoke-dom0less-arm32.sh | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
[PATCH] automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs
Posted by Michal Orzel 8 months, 4 weeks ago
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.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
 automation/scripts/qemu-smoke-dom0-arm32.sh     | 8 +++++---
 automation/scripts/qemu-smoke-dom0less-arm32.sh | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scripts/qemu-smoke-dom0-arm32.sh
index 2c80df089f23..e6f303064a83 100755
--- a/automation/scripts/qemu-smoke-dom0-arm32.sh
+++ b/automation/scripts/qemu-smoke-dom0-arm32.sh
@@ -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
diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh b/automation/scripts/qemu-smoke-dom0less-arm32.sh
index cc91238f4222..fb8f044a51f6 100755
--- a/automation/scripts/qemu-smoke-dom0less-arm32.sh
+++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh
@@ -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
-- 
2.25.1
Re: [PATCH] automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs
Posted by Luca Fancellu 8 months, 4 weeks ago

> On 8 Aug 2023, at 09:50, Michal Orzel <michal.orzel@amd.com> wrote:
> 
> 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.
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Re: [PATCH] automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs
Posted by Stefano Stabellini 8 months, 4 weeks ago
On Tue, 8 Aug 2023, Luca Fancellu wrote:
> > On 8 Aug 2023, at 09:50, Michal Orzel <michal.orzel@amd.com> wrote:
> > 
> > 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.
> > 
> > Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> 
> Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>