]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
automation/cirrus-ci: add smoke tests for the FreeBSD builds xtf gitlab/xtf
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 14 Mar 2025 12:37:46 +0000 (13:37 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Mon, 17 Mar 2025 10:37:48 +0000 (11:37 +0100)
Introduce a basic set of smoke tests using the XTF selftest image, and run
them on QEMU.  Use the matrix keyword to create a different task for each
XTF flavor on each FreeBSD build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
.cirrus.yml
CHANGELOG.md

index c74d5cf6eb9aa605736d7e2fc3c79dd8534f2fd5..bd8e66b1dfd55e23d60a9dd2ef35f9d71835c866 100644 (file)
@@ -5,6 +5,8 @@ freebsd_versions: &FREEBSD_VERSIONS
     FREEBSD_14: freebsd-14-2
     FREEBSD_15: freebsd-15-0-snap
 
+# Build jobs
+
 freebsd_template: &FREEBSD_ENV
   environment:
     APPEND_LIB: /usr/local/lib
@@ -118,3 +120,56 @@ task:
   xtf_artifacts:
     path: xtf/tests/selftest/test-*-selftest
     type: application/octet-stream
+
+# Test jobs
+
+task:
+  name: 'FreeBSD: XTF selftest'
+
+  << : *FREEBSD_ENV_LATEST
+
+  env:
+    matrix:
+      FREEBSD_BUILD: $FREEBSD_13
+      FREEBSD_BUILD: $FREEBSD_14
+      FREEBSD_BUILD: $FREEBSD_15
+
+  depends_on:
+    - freebsd_full_$FREEBSD_BUILD
+    - xtf
+
+  install_script: pkg install -y qemu-nox11 expect
+
+  env:
+    matrix:
+      XTF_ARCH: hvm32
+      XTF_ARCH: hvm32pae
+      XTF_ARCH: hvm32pse
+      XTF_ARCH: hvm64
+      XTF_ARCH: pv64
+
+  fetch_script:
+    - fetch https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/xtf/xtf.zip
+    - fetch https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/freebsd_full_$FREEBSD_BUILD/xen.zip
+    - unzip xtf.zip
+    - unzip xen.zip
+
+  test_script: |
+    - case "$XTF_ARCH" in
+        *hvm*)
+          XEN_EXTRA_CMD="dom0=pvh dom0-iommu=none"
+          ;;
+      esac
+    - export
+      TEST_CMD="qemu-system-x86_64 -kernel xen/xen -initrd xtf/tests/selftest/test-${XTF_ARCH}-selftest
+                                   -append \"loglvl=all console=com1 noreboot console_timestamps=boot dom0=verbose ${XEN_EXTRA_CMD}\"
+                                   -m 512 -nographic -monitor none -serial stdio"
+    - export TEST_LOG="serial-${FREEBSD_BUILD}-${XTF_ARCH}.txt"
+    - export PASSED="Test result: SUCCESS"
+    - export TEST_TIMEOUT=120
+    - ./automation/scripts/console.exp | sed 's/\r\+$//'
+
+  always:
+    serial_artifacts:
+      path: serial-*.txt
+      type: text/plain
index 7201c484f89905898f8bd60cf9b0a0a75fca3298..16c14e933c802253bce91ab1bf96a27181aea46e 100644 (file)
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
  - On x86:
    - Option to attempt to fixup p2m page-faults on PVH dom0.
    - Resizable BARs is supported for PVH dom0.
+   - Smoke tests for the FreeBSD Xen builds in Cirrus CI.
 
 ### Removed