Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-core][PATCH] libsoup: add ptest support
@ 2026-10-12  9:56 Pratik Farkase
  2026-10-12 17:15 ` Mathieu Dubois-Briand
  0 siblings, 1 reply; 6+ messages in thread
From: Pratik Farkase @ 2026-10-12  9:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

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.

header-parsing-test is excluded as it aborts in do_param_list_tests()
with the current glib; the rest of the suite passes.

Tested on qemux86-64 with ptest-runner: 34 tests, all pass.

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../recipes-support/libsoup/libsoup/run-ptest |  3 +++
 meta/recipes-support/libsoup/libsoup_3.6.6.bb | 22 +++++++++++++++----
 3 files changed, 22 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 dba231d249..2cbc5d39d6 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.6.6.bb b/meta/recipes-support/libsoup/libsoup_3.6.6.bb
index e5c2d18ded..fbc1d3c8bc 100644
--- a/meta/recipes-support/libsoup/libsoup_3.6.6.bb
+++ b/meta/recipes-support/libsoup/libsoup_3.6.6.bb
@@ -9,7 +9,7 @@ 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] = "51ed0ae06f9d5a40f401ff459e2e5f652f9a510b7730e1359ee66d14d4872740"
 
@@ -21,6 +21,7 @@ SRC_URI += "file://CVE-2025-32049-1.patch \
             file://CVE-2026-5119.patch \
             file://CVE-2026-2708.patch \
             file://CVE-2026-4271.patch \
+            file://run-ptest \
 "
 
 PROVIDES = "libsoup-3.0"
@@ -28,11 +29,12 @@ 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() {
@@ -44,13 +46,21 @@ 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'
 
+# header-parsing-test aborts in do_param_list_tests() with the current
+# glib (soup_header_parse_semi_param_list() returns a single entry for a
+# multi-parameter header). Drop its installed-test metadata so the rest of
+# the suite can run under ptest; the test binary is left in place.
+do_install_ptest:append() {
+    rm -f ${D}${datadir}/installed-tests/libsoup-3.0/header-parsing-test.test
+}
+
 # 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
@@ -60,6 +70,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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH] libsoup: add ptest support
  2026-10-12  9:56 Pratik Farkase
@ 2026-10-12 17:15 ` Mathieu Dubois-Briand
  2026-10-13  8:18   ` Pratik Farkase
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Dubois-Briand @ 2026-10-12 17:15 UTC (permalink / raw)
  To: Pratik Farkase, openembedded-core; +Cc: pratik.farkase

On Mon Oct 12, 2026 at 11:56 AM CEST, Pratik Farkase wrote:
> 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.
>
> header-parsing-test is excluded as it aborts in do_param_list_tests()
> with the current glib; the rest of the suite passes.
>
> Tested on qemux86-64 with ptest-runner: 34 tests, all pass.
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---

Hi Pratik,

We have an upgrade to libsoup 3.8.0 that was merged a few days ago. I
could try to merge the conflicts, but as the recipe did evolve a bit, it
would mean the merged patch would be really different from what you
sent. And we should probably avoid that.

Can you rebase on top of master and send a new version please?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [OE-core][PATCH] libsoup: add ptest support
@ 2026-10-13  8:16 Pratik Farkase
  2026-10-13 19:01 ` Mathieu Dubois-Briand
  0 siblings, 1 reply; 6+ messages in thread
From: Pratik Farkase @ 2026-10-13  8:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

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.

Tested on qemux86-64 with ptest-runner: 36 tests, all pass.

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../recipes-support/libsoup/libsoup/run-ptest |  3 +++
 meta/recipes-support/libsoup/libsoup_3.8.0.bb | 27 ++++++++++++++++---
 3 files changed, 27 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..3db4f0edb3 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,25 @@ 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'
 
+# Exclude two tests that fail under ptest and leave the binaries in place:
+# - header-parsing-test aborts in do_param_list_tests(): a
+#   g_hash_table_size() assertion on a parsed parameter list does not hold
+#   (soup_header_parse_semi_param_list() returns one entry instead of three)
+#   with the current glib.
+# - logger-test's long-invalid-body-length case tries to allocate ~2 GiB and
+#   aborts under g_malloc() when the ptest machine lacks that much memory.
+do_install_ptest:append() {
+    rm -f ${D}${datadir}/installed-tests/libsoup-3.0/header-parsing-test.test
+    rm -f ${D}${datadir}/installed-tests/libsoup-3.0/logger-test.test
+}
+
 # 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 +65,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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH] libsoup: add ptest support
  2026-10-12 17:15 ` Mathieu Dubois-Briand
@ 2026-10-13  8:18   ` Pratik Farkase
  0 siblings, 0 replies; 6+ messages in thread
From: Pratik Farkase @ 2026-10-13  8:18 UTC (permalink / raw)
  To: Mathieu Dubois-Briand, openembedded-core@lists.openembedded.org
  Cc: pratik.farkase@ericsson.com

Hi Mathieu,

Thanks for the heads-up. I've rebased on top of master and reworked the patch for the 3.8.0 recipe. As the recipe changed quite a bit with the upgrade, I have sent it as a fresh
patch rather than a v2.

Best Regards,
Pratik

________________________________________
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sent: Monday, October 12, 2026 7:15 PM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH] libsoup: add ptest support

On Mon Oct 12, 2026 at 11:56 AM CEST, Pratik Farkase wrote:
> 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.
>
> header-parsing-test is excluded as it aborts in do_param_list_tests()
> with the current glib; the rest of the suite passes.
>
> Tested on qemux86-64 with ptest-runner: 34 tests, all pass.
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---

Hi Pratik,

We have an upgrade to libsoup 3.8.0 that was merged a few days ago. I
could try to merge the conflicts, but as the recipe did evolve a bit, it
would mean the merged patch would be really different from what you
sent. And we should probably avoid that.

Can you rebase on top of master and send a new version please?

Thanks,
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH] libsoup: add ptest support
  2026-10-13  8:16 [OE-core][PATCH] libsoup: add ptest support Pratik Farkase
@ 2026-10-13 19:01 ` Mathieu Dubois-Briand
  2026-10-14  9:43   ` Pratik Farkase
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Dubois-Briand @ 2026-10-13 19:01 UTC (permalink / raw)
  To: Pratik Farkase, openembedded-core; +Cc: pratik.farkase

On Tue Oct 13, 2026 at 10:16 AM CEST, Pratik Farkase wrote:
> 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.
>
> Tested on qemux86-64 with ptest-runner: 36 tests, all pass.
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---

Hi Pratik,

Thanks for the rebase.

So not it looks like one of the tests is failing:

Failed ptests:
{'libsoup': ['libsoup-3.0/http2-body-stream-test.test']}

https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4711
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4739
https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/1374
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1361

Can you have a look at the issue?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH] libsoup: add ptest support
  2026-10-13 19:01 ` Mathieu Dubois-Briand
@ 2026-10-14  9:43   ` Pratik Farkase
  0 siblings, 0 replies; 6+ messages in thread
From: Pratik Farkase @ 2026-10-14  9:43 UTC (permalink / raw)
  To: Mathieu Dubois-Briand, openembedded-core@lists.openembedded.org
  Cc: pratik.farkase@ericsson.com

Hi Mathieu,

Saw these failures, these are OOM's. Sent a v2 to allocate more memory.

Best Regards,
Pratik

________________________________________
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sent: Tuesday, October 13, 2026 9:01 PM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH] libsoup: add ptest support

On Tue Oct 13, 2026 at 10:16 AM CEST, Pratik Farkase wrote:
> 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.
>
> Tested on qemux86-64 with ptest-runner: 36 tests, all pass.
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---

Hi Pratik,

Thanks for the rebase.

So not it looks like one of the tests is failing:

Failed ptests:
{'libsoup': ['libsoup-3.0/http2-body-stream-test.test']}

https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4711
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4739
https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/1374
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1361

Can you have a look at the issue?

Thanks,
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-14  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13  8:16 [OE-core][PATCH] libsoup: add ptest support Pratik Farkase
2026-10-13 19:01 ` Mathieu Dubois-Briand
2026-10-14  9:43   ` Pratik Farkase
  -- strict thread matches above, loose matches on Subject: below --
2026-10-12  9:56 Pratik Farkase
2026-10-12 17:15 ` Mathieu Dubois-Briand
2026-10-13  8:18   ` Pratik Farkase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox