Skip to contentSkip to conversation

cirrus-ci: get testing working again

PATCH Superseded Roger Pau Monne 2 participants 6 messages Oct 6, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover cirrus-ci: get testing working again

Hello,

The following series fixes Cirrus-CI testing so it's fully working again:

https://cirrus-ci.com/build/5486825222963200

I request a release-ack to get those committed (once reviewed). The risk is very low, since they only modify Cirrus-CI code, so Gitlab-CI is not changed at all.

Roger Pau Monne (2):
cirrus-ci: install libinotify for FreeBSD
cirrus-ci: fix bashism in the test_script code

 .cirrus.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/2 cirrus-ci: install libinotify for FreeBSD

FreeBSD QEMU build requires libinotify, otherwise the build fails with:

./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found

Install the package and add the /usr/local include and libs paths explicitly as QEMU configure options.

---
 .cirrus.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +4 -1
index f295c8cb0a02..55dc9b39092a 100644
@@ -11,6 +11,8 @@ freebsd_template: &FREEBSD_ENV
   environment:
     APPEND_LIB: /usr/local/lib
     APPEND_INCLUDES: /usr/local/include
+    CONFIG_QEMUU_EXTRA_ARGS: --extra-ldflags=-L${APPEND_LIB}
+                             --extra-cflags=-I${APPEND_INCLUDES}
     CIRRUS_CLONE_DEPTH: 1
     CIRRUS_LOG_TIMESTAMP: true
 
@@ -51,11 +53,12 @@ task:
   install_script: pkg install -y seabios gmake ninja bash
                                  pkgconf bison perl5
                                  yajl lzo2 pixman argp-standalone
-                                 libxml2 glib git python3
+                                 libxml2 glib git python3 libinotify
 
   configure_script:
     - cc --version
     - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin
+                  --with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}"
     - gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig
 
   << : *FREEBSD_CONFIGURE_ARTIFACTS
Signature · 1 line
2.51.0
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH for-4.21 1/2] cirrus-ci: install libinotify for FreeBSD

Quoted 8 lines · Roger Pau Monne

FreeBSD QEMU build requires libinotify, otherwise the build fails with:

./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found

Install the package and add the /usr/local include and libs paths explicitly as QEMU configure options.

Quoted 18 lines
---
 .cirrus.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +2 -0
index f295c8cb0a02..55dc9b39092a 100644
@@ -11,6 +11,8 @@ freebsd_template: &FREEBSD_ENV
   environment:
     APPEND_LIB: /usr/local/lib
     APPEND_INCLUDES: /usr/local/include
+    CONFIG_QEMUU_EXTRA_ARGS: --extra-ldflags=-L${APPEND_LIB}
+                             --extra-cflags=-I${APPEND_INCLUDES}
     CIRRUS_CLONE_DEPTH: 1
     CIRRUS_LOG_TIMESTAMP: true
 

.cirrus.yml task: · line 56

Quoted 5 lines
.cirrus.yml +1 -1
@@ -51,11 +53,12 @@ task:
   install_script: pkg install -y seabios gmake ninja bash
                                  pkgconf bison perl5
                                  yajl lzo2 pixman argp-standalone
-                                 libxml2 glib git python3
+                                 libxml2 glib git python3 libinotify

I presume this is good on FreeBSD 13 and later ?

.cirrus.yml task: · line 64

Quoted 8 lines
.cirrus.yml +1 -0
   configure_script:
     - cc --version
     - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin
+                  --with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}"
     - gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig
 
   << : *FREEBSD_CONFIGURE_ARTIFACTS

Do we really need both the ENV variable and the --configure parts?

I could believe we need both, but that also feels like something we ought to fix.

~Andrew

#3 lore raw

Re: [PATCH for-4.21 1/2] cirrus-ci: install libinotify for FreeBSD

Quoted 29 lines · Andrew Cooper
Quoted 8 lines · Roger Pau Monne

FreeBSD QEMU build requires libinotify, otherwise the build fails with:

./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found

Install the package and add the /usr/local include and libs paths explicitly as QEMU configure options.

Quoted 17 lines
---
 .cirrus.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +2 -0
index f295c8cb0a02..55dc9b39092a 100644
@@ -11,6 +11,8 @@ freebsd_template: &FREEBSD_ENV
   environment:
     APPEND_LIB: /usr/local/lib
     APPEND_INCLUDES: /usr/local/include
+    CONFIG_QEMUU_EXTRA_ARGS: --extra-ldflags=-L${APPEND_LIB}
+                             --extra-cflags=-I${APPEND_INCLUDES}
     CIRRUS_CLONE_DEPTH: 1
     CIRRUS_LOG_TIMESTAMP: true
 
Quoted 8 lines

.cirrus.yml task: · line 56

Quoted 6 lines
.cirrus.yml +1 -1
@@ -51,11 +53,12 @@ task:
   install_script: pkg install -y seabios gmake ninja bash
                                  pkgconf bison perl5
                                  yajl lzo2 pixman argp-standalone
-                                 libxml2 glib git python3
+                                 libxml2 glib git python3 libinotify

I presume this is good on FreeBSD 13 and later ?

The ports makefile doesn't limit libinotify to specific FreeBSD releases, but given 13.5 is the oldest supported version I would think so.

Quoted 10 lines

.cirrus.yml task: · line 64

Quoted 8 lines
.cirrus.yml +1 -0
   configure_script:
     - cc --version
     - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin
+                  --with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}"
     - gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig
 
   << : *FREEBSD_CONFIGURE_ARTIFACTS

Do we really need both the ENV variable and the --configure parts?

Bah, no, the ENV was my first attempt, which doesn't work, and then I forgot to clean it up. That chunk above needs to disappear.

Thanks, Roger.

#4 lore raw

PATCH 2/2 cirrus-ci: fix bashism in the test_script code

In reply to Roger Pau Monne

The default shell in FreeBSD is plain sh, which doesn't support the usage of the '|&' operator:

./automation/scripts/console.exp |& sed 's/\r\+$//' /tmp/scripts34c427adc6599db29cb91221a0939d85.sh: 16: Syntax error: "&" unexpected

Fix this by using a redirection of stderr into stdout, and then a pipe.

Fixes a406195c15dd ("automation: call expect script with redirected standard error")
---
 .cirrus.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.cirrus.yml +1 -1
index 55dc9b39092a..2fa1deeeafc1 100644
@@ -169,7 +169,7 @@ task:
     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\+$//'
+    ./automation/scripts/console.exp 2>&1 | sed 's/\r\+$//'
 
   always:
     serial_artifacts:
Signature · 1 line
2.51.0
Acked-by on v1 2/2
#5 lore raw

Re: [PATCH for-4.21 2/2] cirrus-ci: fix bashism in the test_script code

Quoted 10 lines · Roger Pau Monne

The default shell in FreeBSD is plain sh, which doesn't support the usage of the '|&' operator:

./automation/scripts/console.exp |& sed 's/\r\+$//' /tmp/scripts34c427adc6599db29cb91221a0939d85.sh: 16: Syntax error: "&" unexpected

Fix this by using a redirection of stderr into stdout, and then a pipe.

Fixes a406195c15dd ("automation: call expect script with redirected standard error")

It's sad that this slipped in because the CirrusCI runs were reliably broken by the libinotify issue.

~Andrew