Skip to contentSkip to conversation

Fixing gitlab CI tests

PATCH In review Anthony PERARD 2 participants 7 messages Sep 30, 2021 – Oct 1, 2021

lore
Share & tools
lore
#0 lore raw

cover Fixing gitlab CI tests

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.gitlab-pv32-test-fix-v1

Fixing tests due to CONFIG_PV32 missing.

debian:stretch container needs updating due to certificate issue, so also install qemu in the container.

Anthony PERARD (2):
automation: switch GitLab x86 smoke test to use PV 64bit binary
automation: Add qemu to debian:stretch container for smoke test

 automation/build/debian/stretch.dockerfile |  2 ++
 automation/scripts/qemu-smoke-x86-64.sh    | 10 ++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
Anthony PERARD
#1 lore raw

PATCH 1/2 automation: switch GitLab x86 smoke test to use PV 64bit binary

From: Anthony PERARD <[email protected]>

Xen is now built without CONFIG_PV32 by default and thus test jobs "qemu-smoke-x86-64-gcc" and "qemu-smoke-x86-64-clang" fails because they are using XTF's "test-pv32pae-example" which is an hello word 32bit PV guest.

As we are looking for whether Xen boot or not with a quick smoke test, we will use "test-pv64-example" instead, which is a hello word 64bit PV guest.

---
Cc: Andrew Cooper <[email protected]>

---
 automation/scripts/qemu-smoke-x86-64.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
automation/scripts/qemu-smoke-x86-64.sh +1 -1
index 09152e3e9ca1..4b176c508dec 100755
@@ -16,7 +16,7 @@ cd xtf && make -j$(nproc) && cd -
 
 case $variant in
     pvh) k=test-hvm32pae-example extra="dom0-iommu=none dom0=pvh" ;;
-    *)   k=test-pv32pae-example  extra= ;;
+    *)   k=test-pv64-example     extra= ;;
 esac
 
 rm -f smoke.serial
Signature · 1 line
Anthony PERARD
Reviewed-by on v1 1/2
#2 lore raw

Re: [XEN PATCH 1/2] automation: switch GitLab x86 smoke test to use PV 64bit binary

Quoted 7 lines · Anthony PERARD

From: Anthony PERARD <[email protected]>

Xen is now built without CONFIG_PV32 by default and thus test jobs "qemu-smoke-x86-64-gcc" and "qemu-smoke-x86-64-clang" fails because they are using XTF's "test-pv32pae-example" which is an hello word 32bit PV guest.

Quoted 5 lines

As we are looking for whether Xen boot or not with a quick smoke test, we will use "test-pv64-example" instead, which is a hello word 64bit PV guest.

Quoted 11 lines

---
Cc: Andrew Cooper <[email protected]>

---
 automation/scripts/qemu-smoke-x86-64.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
automation/scripts/qemu-smoke-x86-64.sh +0 -0
index 09152e3e9ca1..4b176c508dec 100755

automation/scripts/qemu-smoke-x86-64.sh cd xtf && make -j$(nproc) && cd - · line 18

Quoted 3 lines
automation/scripts/qemu-smoke-x86-64.sh +0 -0
@@ -16,7 +16,7 @@ cd xtf && make -j$(nproc) && cd -
 
 case $variant in
     pvh) k=test-hvm32pae-example extra="dom0-iommu=none dom0=pvh" ;;

TBH, I'd be tempted to change to hvm64 here too for consistency.  I can fix on commit if you're happy.

~Andrew

Quoted 5 lines
automation/scripts/qemu-smoke-x86-64.sh +1 -1
-    *)   k=test-pv32pae-example  extra= ;;
+    *)   k=test-pv64-example     extra= ;;
 esac
 
 rm -f smoke.serial
#3 lore raw

Re: [XEN PATCH 1/2] automation: switch GitLab x86 smoke test to use PV 64bit binary

Quoted 28 lines · Andrew Cooper
Quoted 7 lines · Anthony PERARD

From: Anthony PERARD <[email protected]>

Xen is now built without CONFIG_PV32 by default and thus test jobs "qemu-smoke-x86-64-gcc" and "qemu-smoke-x86-64-clang" fails because they are using XTF's "test-pv32pae-example" which is an hello word 32bit PV guest.

Quoted 5 lines

As we are looking for whether Xen boot or not with a quick smoke test, we will use "test-pv64-example" instead, which is a hello word 64bit PV guest.

Quoted 12 lines

---
Cc: Andrew Cooper <[email protected]>

---
 automation/scripts/qemu-smoke-x86-64.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
automation/scripts/qemu-smoke-x86-64.sh +0 -0
index 09152e3e9ca1..4b176c508dec 100755
@@ -16,7 +16,7 @@ cd xtf && make -j$(nproc) && cd -
 
Quoted 5 lines

automation/scripts/qemu-smoke-x86-64.sh cd xtf && make -j$(nproc) && cd - · line 18

Quoted 2 lines
automation/scripts/qemu-smoke-x86-64.sh +0 -0
 case $variant in
     pvh) k=test-hvm32pae-example extra="dom0-iommu=none dom0=pvh" ;;

TBH, I'd be tempted to change to hvm64 here too for consistency.  I can fix on commit if you're happy.

Sound good to me, I haven't tested it, but I guess it should work.

Thanks,

Signature · 1 line
Anthony PERARD
#4 lore raw

PATCH 2/2 automation: Add qemu to debian:stretch container for smoke test

In reply to Anthony PERARD

From: Anthony PERARD <[email protected]>

We can add qemu into the container so that there's no need to install it everytime we run a test.

---

Also, smoke tests stopped working as of today due to outdated
root certificate, so container needs to be updated anyway.
fatal: unable to access 'https://xenbits.xen.org/git-http/xtf.git/': server certificate verification failed.

I haven't push the container yet, I've only pushed it as debian:tmp-stretch for testing it.

---
 automation/build/debian/stretch.dockerfile | 2 ++
 automation/scripts/qemu-smoke-x86-64.sh    | 8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)
automation/build/debian/stretch.dockerfile +2 -0
index e2ee14e2017c..da6aa874dd70 100644
@@ -47,6 +47,8 @@ RUN apt-get update && \
         nasm \
         gnupg \
         apt-transport-https \
+        # for test phase, qemu-smoke-* jobs
+        qemu-system-x86 \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/scripts/qemu-smoke-x86-64.sh +5 -3
index 4b176c508dec..8ac065491c75 100755
@@ -6,9 +6,11 @@ set -ex
 variant=$1
 
 # Install QEMU
-export DEBIAN_FRONTENT=noninteractive
-apt-get -qy update
-apt-get -qy install qemu-system-x86
+if ! type qemu-system-x86_64; then
+    export DEBIAN_FRONTENT=noninteractive
+    apt-get -qy update
+    apt-get -qy install qemu-system-x86
+fi
 
 # Clone and build XTF
 git clone https://xenbits.xen.org/git-http/xtf.git
Signature · 1 line
Anthony PERARD
#5 lore raw

Re: [XEN PATCH 2/2] automation: Add qemu to debian:stretch container for smoke test

Quoted 38 lines · Anthony PERARD

From: Anthony PERARD <[email protected]>

We can add qemu into the container so that there's no need to install it everytime we run a test.

---

Also, smoke tests stopped working as of today due to outdated
root certificate, so container needs to be updated anyway.
fatal: unable to access 'https://xenbits.xen.org/git-http/xtf.git/': server certificate verification failed.

I haven't push the container yet, I've only pushed it as debian:tmp-stretch for testing it.

---
 automation/build/debian/stretch.dockerfile | 2 ++
 automation/scripts/qemu-smoke-x86-64.sh    | 8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)
automation/build/debian/stretch.dockerfile +2 -0
index e2ee14e2017c..da6aa874dd70 100644
@@ -47,6 +47,8 @@ RUN apt-get update && \
         nasm \
         gnupg \
         apt-transport-https \
+        # for test phase, qemu-smoke-* jobs
+        qemu-system-x86 \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/scripts/qemu-smoke-x86-64.sh +0 -0
index 4b176c508dec..8ac065491c75 100755
@@ -6,9 +6,11 @@ set -ex
 variant=$1

automation/scripts/qemu-smoke-x86-64.sh set -ex · line 13

Quoted 10 lines
automation/scripts/qemu-smoke-x86-64.sh +5 -3
 
 # Install QEMU
-export DEBIAN_FRONTENT=noninteractive
-apt-get -qy update
-apt-get -qy install qemu-system-x86
+if ! type qemu-system-x86_64; then
+    export DEBIAN_FRONTENT=noninteractive
+    apt-get -qy update
+    apt-get -qy install qemu-system-x86
+fi

I'd just delete this all.  It's wrong for running smoke tests in other containers anyway.

Can fix commit too.

~Andrew

Quoted 3 lines
automation/scripts/qemu-smoke-x86-64.sh +0 -0
 # Clone and build XTF
 git clone https://xenbits.xen.org/git-http/xtf.git
#6 lore raw

Re: [XEN PATCH 2/2] automation: Add qemu to debian:stretch container for smoke test

Quoted 19 lines · Andrew Cooper
Quoted 4 lines · Anthony PERARD
automation/scripts/qemu-smoke-x86-64.sh +0 -0
@@ -6,9 +6,11 @@ set -ex
 variant=$1

automation/scripts/qemu-smoke-x86-64.sh set -ex · line 13

Quoted 10 lines
automation/scripts/qemu-smoke-x86-64.sh +5 -3
 
 # Install QEMU
-export DEBIAN_FRONTENT=noninteractive
-apt-get -qy update
-apt-get -qy install qemu-system-x86
+if ! type qemu-system-x86_64; then
+    export DEBIAN_FRONTENT=noninteractive
+    apt-get -qy update
+    apt-get -qy install qemu-system-x86
+fi

I'd just delete this all.  It's wrong for running smoke tests in other containers anyway.

Quoted 1 line

Can fix commit too.

Sounds good, thanks. In that case, I need to push the updated container before we commit the patch.

Cheers,

Signature · 1 line
Anthony PERARD