All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratik Farkase <pratik.farkase@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com, Pratik Farkase <pratik.farkase@est.tech>
Subject: [OE-core][PATCH v4] libsoup: add ptest support
Date: Tue, 20 Oct 2026 14:26:42 +0200	[thread overview]
Message-ID: <20261020122642.28387-1-pratik.farkase@est.tech> (raw)
In-Reply-To: <20261014085044.14497-1-pratik.farkase@est.tech>

Build the installed-tests via the meson tests/installed_tests options
(enabled through a new 'tests' PACKAGECONFIG when ptest is in
DISTRO_FEATURES) and run them under ptest with
gnome-desktop-testing-runner.

Some tests are excluded via PTEST_SKIP_TESTS:
- header-parsing-test hits a glib parameter-list parsing assertion.
- logger-test and http2-body-stream-test allocate multiple GiB and are
  OOM-killed on the ptest machines.
- http2-test (riscv64) and multithread-test (aarch64) intermittently
  abort during teardown on the slower emulated targets.

Tested on qemux86-64 with ptest-runner.

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---

Notes:
    Changes in v4:
    - Skip http2-test on riscv64 and multithread-test on aarch64: both
      intermittently abort (SIGABRT) during teardown on the slower emulated
      targets (seen on the autobuilder over several days).
    
    Changes in v3:
    - Drop the QB_MEM bump; exclude logger-test and http2-body-stream-test
      instead, as 4 GiB was still OOM-killed on the autobuilder.
    
    Changes in v2:
    - Rebased onto master after the libsoup 3.6.6 -> 3.8.0 upgrade.

 .../distro/include/ptest-packagelists.inc     |  1 +
 .../recipes-support/libsoup/libsoup/run-ptest |  3 ++
 meta/recipes-support/libsoup/libsoup_3.8.0.bb | 37 +++++++++++++++++--
 3 files changed, 37 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-support/libsoup/libsoup/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 2bd11b1706..992d3666b9 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -138,6 +138,7 @@ PTESTS_SLOW = "\
     libmodule-build-perl \
     libpcap \
     libpng \
+    libsoup \
     ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'libseccomp', '',d)} \
     lttng-tools \
     lz4 \
diff --git a/meta/recipes-support/libsoup/libsoup/run-ptest b/meta/recipes-support/libsoup/libsoup/run-ptest
new file mode 100644
index 0000000000..efe975cf3f
--- /dev/null
+++ b/meta/recipes-support/libsoup/libsoup/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner libsoup-3.0
diff --git a/meta/recipes-support/libsoup/libsoup_3.8.0.bb b/meta/recipes-support/libsoup/libsoup_3.8.0.bb
index 2a40eecaea..1ca40423f0 100644
--- a/meta/recipes-support/libsoup/libsoup_3.8.0.bb
+++ b/meta/recipes-support/libsoup/libsoup_3.8.0.bb
@@ -9,20 +9,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
 
 DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl nghttp2"
 
-inherit gettext gnomebase upstream-version-is-even gobject-introspection gi-docgen vala
+inherit gettext gnomebase upstream-version-is-even gobject-introspection gi-docgen vala ptest-gnome
 
 SRC_URI[archive.sha256sum] = "bbf08fa3e03a88c31a3d27a0d87cb422e9490f2d08e149211103df6d638a2238"
 
+SRC_URI += "file://run-ptest"
+
 PROVIDES = "libsoup-3.0"
 
 GIR_MESON_ENABLE_FLAG = 'enabled'
 GIR_MESON_DISABLE_FLAG = 'disabled'
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
 PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
 PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
 PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
 PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
+PACKAGECONFIG[tests] = "-Dtests=true -Dinstalled_tests=true,-Dtests=false -Dinstalled_tests=false"
 
 # Tell libsoup where the target ntlm_auth is installed
 do_write_config:append:class-target() {
@@ -34,13 +37,35 @@ EOF
 EXTRA_OEMESON:append:class-target = " --cross-file ${WORKDIR}/soup.cross"
 
 EXTRA_OEMESON += "-Dtls_check=false"
-# Disable the test suites
-EXTRA_OEMESON += "-Dtests=false -Dautobahn=disabled -Dpkcs11_tests=disabled"
+# tests are controlled via the 'tests' PACKAGECONFIG (enabled for ptest)
+EXTRA_OEMESON += "-Dautobahn=disabled -Dpkcs11_tests=disabled"
 
 GIDOCGEN_MESON_OPTION = 'docs'
 GIDOCGEN_MESON_ENABLE_FLAG = 'enabled'
 GIDOCGEN_MESON_DISABLE_FLAG = 'disabled'
 
+# These tests abort under ptest and leave the binaries in place:
+# - header-parsing-test: a g_hash_table_size() assertion in
+#   do_param_list_tests() does not hold (returns one entry instead of three)
+#   with the current glib.
+# - logger-test (long-invalid-body-length) and http2-body-stream-test
+#   (large_data) exercise multi-GiB allocations and are killed by the OOM
+#   killer on the memory-constrained ptest machines.
+PTEST_SKIP_TESTS = "header-parsing-test logger-test http2-body-stream-test"
+
+# These tests intermittently abort (SIGABRT) during teardown under the slower
+# emulated targets, so skip them there:
+# - http2-test on qemuriscv64.
+# - multithread-test on qemuarm64 (glibc and musl).
+PTEST_SKIP_TESTS:append:riscv64 = " http2-test"
+PTEST_SKIP_TESTS:append:aarch64 = " multithread-test"
+
+do_install_ptest:append() {
+    for t in ${PTEST_SKIP_TESTS}; do
+        rm -f ${D}${datadir}/installed-tests/libsoup-3.0/$t.test
+    done
+}
+
 # When built without gnome support, libsoup will contain only one shared lib
 # and will therefore become subject to renaming by debian.bbclass. Prevent
 # renaming in order to keep the package name consistent regardless of whether
@@ -50,6 +75,10 @@ DEBIAN_NOAUTONAME:${PN} = "1"
 # glib-networking is needed for SSL, proxies, etc.
 RRECOMMENDS:${PN} = "glib-networking"
 
+# The TLS-based tests (ssl, server-auth, websocket, hsts) need a glib TLS
+# backend at runtime.
+RDEPENDS:${PN}-ptest += "glib-networking"
+
 BBCLASSEXTEND = "native nativesdk"
 
 CVE_STATUS[CVE-2026-1467] = "fixed-version: fixed in 3.6.6"
-- 
2.43.0


  parent reply	other threads:[~2026-10-20 12:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12  9:56 [OE-core][PATCH] libsoup: add ptest support Pratik Farkase
2026-10-12 17:15 ` Mathieu Dubois-Briand
2026-10-13  8:18   ` Pratik Farkase
2026-10-14  8:50 ` [OE-core][PATCH v2] " Pratik Farkase
2026-10-14 11:48   ` Mathieu Dubois-Briand
2026-10-14 12:09     ` Pratik Farkase
2026-10-14 12:07   ` [OE-core][PATCH v3] " Pratik Farkase
2026-10-16  8:05     ` Mathieu Dubois-Briand
     [not found]     ` <18DEF3F6676C6093.2594042@lists.openembedded.org>
2026-10-20  7:36       ` Mathieu Dubois-Briand
2026-10-20 12:46         ` Pratik Farkase
2026-10-20 12:26   ` Pratik Farkase [this message]
2026-10-22 12:34     ` [OE-core][PATCH v4] " Ross Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261020122642.28387-1-pratik.farkase@est.tech \
    --to=pratik.farkase@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pratik.farkase@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.