* RE: [OE-core][PATCH v2] libffi: add ptest support
2026-05-08 10:24 ` [OE-core][PATCH v2] " Pratik Farkase
@ 2026-05-08 11:25 ` Marko, Peter
2026-05-08 11:38 ` Pratik Farkase
2026-05-08 11:36 ` [OE-core][PATCH v3] " Pratik Farkase
` (2 subsequent siblings)
3 siblings, 1 reply; 18+ messages in thread
From: Marko, Peter @ 2026-05-08 11:25 UTC (permalink / raw)
To: Pratik Farkase, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Pratik Farkase
> Sent: Friday, May 8, 2026 12:24 PM
> To: openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com; Pratik Farkase <pratik.farkase@est.tech>
> Subject: [OE-core][PATCH v2] libffi: add ptest support
>
> Add ptest support for libffi using all upstream test suites: bhaible,
> call, closures, complex, go, and threads.
>
> Tests are compiled on-target against the installed libffi. Headers
> (including the generated fficonfig.h) and a linker symlink are installed
> in the ptest directory to avoid depending on libffi-dev.
>
> Tested on qemux86-64 with ptest-runner: 199 PASS, 0 FAIL, 2 SKIP (349s).
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---
> Changes in v2 :
> - Include all upstream test suites instead of only bhaible
> - Install fficonfig.h required by ffitest.h
> - Add support for C++ tests (closures/unwindtest*.cc)
> - Add -lpthread for threads suite
> ---
> .../distro/include/ptest-packagelists.inc | 1 +
> meta/recipes-support/libffi/libffi/run-ptest | 53 +++++++++++++++++++
> meta/recipes-support/libffi/libffi_3.5.2.bb | 21 +++++++-
> 3 files changed, 74 insertions(+), 1 deletion(-)
> create mode 100755 meta/recipes-support/libffi/libffi/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc
> b/meta/conf/distro/include/ptest-packagelists.inc
> index 50b6a8a41e..79b541a199 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -34,6 +34,7 @@ PTESTS_FAST = "\
Comment for PTESTS_FASTS is: "ptests which take less than ~30s each",
While commit message suggests this takes 10x more (349s)
> libconfig \
> libconvert-asn1-perl \
> libexif \
> + libffi \
> libgpg-error\
> libksba \
> libmd \
> diff --git a/meta/recipes-support/libffi/libffi/run-ptest b/meta/recipes-
> support/libffi/libffi/run-ptest
> new file mode 100755
> index 0000000000..9f72becda1
> --- /dev/null
> +++ b/meta/recipes-support/libffi/libffi/run-ptest
> @@ -0,0 +1,53 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: MIT
> +
> +PTEST_DIR=$(cd "$(dirname "$0")" && pwd)
> +CFLAGS="-O2 -Wall -I$PTEST_DIR/include -L$PTEST_DIR/lib"
> +
> +# bhaible tests validate by comparing paired output lines
> +for t in test-call test-callback; do
> + src="$PTEST_DIR/testsuite/libffi.bhaible/$t.c"
> + if gcc $CFLAGS -o "$PTEST_DIR/$t" "$src" -lffi 2>&1; then
> + "$PTEST_DIR/$t" > "$PTEST_DIR/$t.out" 2>&1
> + if ! LC_ALL=C uniq -u < "$PTEST_DIR/$t.out" | grep -q .; then
> + echo "PASS: libffi.bhaible/$t"
> + else
> + echo "FAIL: libffi.bhaible/$t"
> + cat "$PTEST_DIR/$t.out"
> + fi
> + else
> + echo "SKIP: libffi.bhaible/$t"
> + fi
> + rm -f "$PTEST_DIR/$t" "$PTEST_DIR/$t.out"
> +done
> +
> +# Individual test programs from upstream dejagnu suites
> +for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
> + dir="$PTEST_DIR/testsuite/$suite"
> + [ -d "$dir" ] || continue
> +
> + extra=""
> + [ "$suite" = "libffi.threads" ] && extra="-lpthread"
> +
> + for src in "$dir"/*.c "$dir"/*.cc; do
> + [ -f "$src" ] || continue
> + grep -q "dg-do run" "$src" || continue
> +
> + name=$(basename "${src%.*}")
> + case "$src" in
> + *.cc) cc="g++";;
> + *) cc="gcc";;
> + esac
> +
> + if $cc $CFLAGS -o "$PTEST_DIR/$name" "$src" -lffi $extra 2>&1; then
> + if "$PTEST_DIR/$name" 2>&1; then
> + echo "PASS: $suite/$name"
> + else
> + echo "FAIL: $suite/$name"
> + fi
> + else
> + echo "SKIP: $suite/$name"
> + fi
> + rm -f "$PTEST_DIR/$name"
> + done
> +done
> diff --git a/meta/recipes-support/libffi/libffi_3.5.2.bb b/meta/recipes-
> support/libffi/libffi_3.5.2.bb
> index d3aa90d429..ec2b8032d3 100644
> --- a/meta/recipes-support/libffi/libffi_3.5.2.bb
> +++ b/meta/recipes-support/libffi/libffi_3.5.2.bb
> @@ -12,6 +12,7 @@ LIC_FILES_CHKSUM =
> "file://LICENSE;md5=ce4763670c5b7756000561f9af1ab178"
>
> SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \
> file://not-win32.patch \
> + file://run-ptest \
> "
> SRC_URI[sha256sum] =
> "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
>
> @@ -19,7 +20,7 @@ EXTRA_OECONF = "--disable-builddir"
> EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
> EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
>
> -inherit autotools texinfo multilib_header github-releases
> +inherit autotools texinfo multilib_header github-releases ptest
>
> do_install:append() {
> oe_multilib_header ffi.h ffitarget.h
> @@ -30,3 +31,21 @@ do_install:append() {
> MIPS_INSTRUCTION_SET = "mips"
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential"
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/testsuite
> + for suite in libffi.bhaible libffi.call libffi.closures libffi.complex \
> + libffi.go libffi.threads; do
> + cp -r ${S}/testsuite/$suite ${D}${PTEST_PATH}/testsuite/
> + done
> +
> + install -d ${D}${PTEST_PATH}/include
> + install -m 0644 ${B}/fficonfig.h ${D}${PTEST_PATH}/include/
> + install -m 0644 ${B}/include/ffi.h ${D}${PTEST_PATH}/include/
> + install -m 0644 ${B}/include/ffitarget.h ${D}${PTEST_PATH}/include/
> +
> + install -d ${D}${PTEST_PATH}/lib
> + ln -sf ${libdir}/libffi.so.8 ${D}${PTEST_PATH}/lib/libffi.so
> +}
> --
> 2.43.0
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v2] libffi: add ptest support
2026-05-08 11:25 ` Marko, Peter
@ 2026-05-08 11:38 ` Pratik Farkase
0 siblings, 0 replies; 18+ messages in thread
From: Pratik Farkase @ 2026-05-08 11:38 UTC (permalink / raw)
To: Marko, Peter, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Hi Peter,
Good catch, thanks. v1 only had 2 tests (bhaible suite) which ran in ~29s,
but v2 added all upstream test suites (199 tests) pushing it to 349s.
I've moved libffi to PTESTS_SLOW in v3.
Best Regards,
Pratik
________________________________________
From: Marko, Peter <Peter.Marko@siemens.com>
Sent: Friday, May 8, 2026 1:25 PM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: RE: [OE-core][PATCH v2] libffi: add ptest support
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Pratik Farkase
> Sent: Friday, May 8, 2026 12:24 PM
> To: openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com; Pratik Farkase <pratik.farkase@est.tech>
> Subject: [OE-core][PATCH v2] libffi: add ptest support
>
> Add ptest support for libffi using all upstream test suites: bhaible,
> call, closures, complex, go, and threads.
>
> Tests are compiled on-target against the installed libffi. Headers
> (including the generated fficonfig.h) and a linker symlink are installed
> in the ptest directory to avoid depending on libffi-dev.
>
> Tested on qemux86-64 with ptest-runner: 199 PASS, 0 FAIL, 2 SKIP (349s).
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---
> Changes in v2 :
> - Include all upstream test suites instead of only bhaible
> - Install fficonfig.h required by ffitest.h
> - Add support for C++ tests (closures/unwindtest*.cc)
> - Add -lpthread for threads suite
> ---
> .../distro/include/ptest-packagelists.inc | 1 +
> meta/recipes-support/libffi/libffi/run-ptest | 53 +++++++++++++++++++
> meta/recipes-support/libffi/libffi_3.5.2.bb | 21 +++++++-
> 3 files changed, 74 insertions(+), 1 deletion(-)
> create mode 100755 meta/recipes-support/libffi/libffi/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc
> b/meta/conf/distro/include/ptest-packagelists.inc
> index 50b6a8a41e..79b541a199 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -34,6 +34,7 @@ PTESTS_FAST = "\
Comment for PTESTS_FASTS is: "ptests which take less than ~30s each",
While commit message suggests this takes 10x more (349s)
> libconfig \
> libconvert-asn1-perl \
> libexif \
> + libffi \
> libgpg-error\
> libksba \
> libmd \
> diff --git a/meta/recipes-support/libffi/libffi/run-ptest b/meta/recipes-
> support/libffi/libffi/run-ptest
> new file mode 100755
> index 0000000000..9f72becda1
> --- /dev/null
> +++ b/meta/recipes-support/libffi/libffi/run-ptest
> @@ -0,0 +1,53 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: MIT
> +
> +PTEST_DIR=$(cd "$(dirname "$0")" && pwd)
> +CFLAGS="-O2 -Wall -I$PTEST_DIR/include -L$PTEST_DIR/lib"
> +
> +# bhaible tests validate by comparing paired output lines
> +for t in test-call test-callback; do
> + src="$PTEST_DIR/testsuite/libffi.bhaible/$t.c"
> + if gcc $CFLAGS -o "$PTEST_DIR/$t" "$src" -lffi 2>&1; then
> + "$PTEST_DIR/$t" > "$PTEST_DIR/$t.out" 2>&1
> + if ! LC_ALL=C uniq -u < "$PTEST_DIR/$t.out" | grep -q .; then
> + echo "PASS: libffi.bhaible/$t"
> + else
> + echo "FAIL: libffi.bhaible/$t"
> + cat "$PTEST_DIR/$t.out"
> + fi
> + else
> + echo "SKIP: libffi.bhaible/$t"
> + fi
> + rm -f "$PTEST_DIR/$t" "$PTEST_DIR/$t.out"
> +done
> +
> +# Individual test programs from upstream dejagnu suites
> +for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
> + dir="$PTEST_DIR/testsuite/$suite"
> + [ -d "$dir" ] || continue
> +
> + extra=""
> + [ "$suite" = "libffi.threads" ] && extra="-lpthread"
> +
> + for src in "$dir"/*.c "$dir"/*.cc; do
> + [ -f "$src" ] || continue
> + grep -q "dg-do run" "$src" || continue
> +
> + name=$(basename "${src%.*}")
> + case "$src" in
> + *.cc) cc="g++";;
> + *) cc="gcc";;
> + esac
> +
> + if $cc $CFLAGS -o "$PTEST_DIR/$name" "$src" -lffi $extra 2>&1; then
> + if "$PTEST_DIR/$name" 2>&1; then
> + echo "PASS: $suite/$name"
> + else
> + echo "FAIL: $suite/$name"
> + fi
> + else
> + echo "SKIP: $suite/$name"
> + fi
> + rm -f "$PTEST_DIR/$name"
> + done
> +done
> diff --git a/meta/recipes-support/libffi/libffi_3.5.2.bb b/meta/recipes-
> support/libffi/libffi_3.5.2.bb
> index d3aa90d429..ec2b8032d3 100644
> --- a/meta/recipes-support/libffi/libffi_3.5.2.bb
> +++ b/meta/recipes-support/libffi/libffi_3.5.2.bb
> @@ -12,6 +12,7 @@ LIC_FILES_CHKSUM =
> "file://LICENSE;md5=ce4763670c5b7756000561f9af1ab178"
>
> SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \
> file://not-win32.patch \
> + file://run-ptest \
> "
> SRC_URI[sha256sum] =
> "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
>
> @@ -19,7 +20,7 @@ EXTRA_OECONF = "--disable-builddir"
> EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
> EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
>
> -inherit autotools texinfo multilib_header github-releases
> +inherit autotools texinfo multilib_header github-releases ptest
>
> do_install:append() {
> oe_multilib_header ffi.h ffitarget.h
> @@ -30,3 +31,21 @@ do_install:append() {
> MIPS_INSTRUCTION_SET = "mips"
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential"
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/testsuite
> + for suite in libffi.bhaible libffi.call libffi.closures libffi.complex \
> + libffi.go libffi.threads; do
> + cp -r ${S}/testsuite/$suite ${D}${PTEST_PATH}/testsuite/
> + done
> +
> + install -d ${D}${PTEST_PATH}/include
> + install -m 0644 ${B}/fficonfig.h ${D}${PTEST_PATH}/include/
> + install -m 0644 ${B}/include/ffi.h ${D}${PTEST_PATH}/include/
> + install -m 0644 ${B}/include/ffitarget.h ${D}${PTEST_PATH}/include/
> +
> + install -d ${D}${PTEST_PATH}/lib
> + ln -sf ${libdir}/libffi.so.8 ${D}${PTEST_PATH}/lib/libffi.so
> +}
> --
> 2.43.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [OE-core][PATCH v3] libffi: add ptest support
2026-05-08 10:24 ` [OE-core][PATCH v2] " Pratik Farkase
2026-05-08 11:25 ` Marko, Peter
@ 2026-05-08 11:36 ` Pratik Farkase
2026-05-11 6:09 ` Mathieu Dubois-Briand
2026-05-13 13:27 ` [OE-core][PATCH v4] " Pratik Farkase
2026-05-25 9:30 ` [OE-core][PATCH v5] " Pratik Farkase
3 siblings, 1 reply; 18+ messages in thread
From: Pratik Farkase @ 2026-05-08 11:36 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libffi using all upstream test suites: bhaible,
call, closures, complex, go, and threads.
Tests are compiled on-target against the installed libffi. Headers
(including the generated fficonfig.h) and a linker symlink are installed
in the ptest directory to avoid depending on libffi-dev.
Tested on qemux86-64 with ptest-runner: 199 PASS, 0 FAIL, 2 SKIP (349s).
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v3:
- Move libffi from PTESTS_FAST to PTESTS_SLOW (349s) runtime
Changes in v2 :
- Include all upstream test suites instead of only bhaible
- Install fficonfig.h required by ffitest.h
- Add support for C++ tests (closures/unwindtest*.cc)
- Add -lpthread for threads suite
---
.../distro/include/ptest-packagelists.inc | 1 +
meta/recipes-support/libffi/libffi/run-ptest | 53 +++++++++++++++++++
meta/recipes-support/libffi/libffi_3.5.2.bb | 21 +++++++-
3 files changed, 74 insertions(+), 1 deletion(-)
create mode 100755 meta/recipes-support/libffi/libffi/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 50b6a8a41e..68189ec2a3 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -126,6 +126,7 @@ PTESTS_SLOW = "\
less \
libevent \
libgcrypt \
+ libffi \
libmodule-build-perl \
libpng \
${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'libseccomp', '',d)} \
diff --git a/meta/recipes-support/libffi/libffi/run-ptest b/meta/recipes-support/libffi/libffi/run-ptest
new file mode 100755
index 0000000000..9f72becda1
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/run-ptest
@@ -0,0 +1,53 @@
+#!/bin/sh
+# SPDX-License-Identifier: MIT
+
+PTEST_DIR=$(cd "$(dirname "$0")" && pwd)
+CFLAGS="-O2 -Wall -I$PTEST_DIR/include -L$PTEST_DIR/lib"
+
+# bhaible tests validate by comparing paired output lines
+for t in test-call test-callback; do
+ src="$PTEST_DIR/testsuite/libffi.bhaible/$t.c"
+ if gcc $CFLAGS -o "$PTEST_DIR/$t" "$src" -lffi 2>&1; then
+ "$PTEST_DIR/$t" > "$PTEST_DIR/$t.out" 2>&1
+ if ! LC_ALL=C uniq -u < "$PTEST_DIR/$t.out" | grep -q .; then
+ echo "PASS: libffi.bhaible/$t"
+ else
+ echo "FAIL: libffi.bhaible/$t"
+ cat "$PTEST_DIR/$t.out"
+ fi
+ else
+ echo "SKIP: libffi.bhaible/$t"
+ fi
+ rm -f "$PTEST_DIR/$t" "$PTEST_DIR/$t.out"
+done
+
+# Individual test programs from upstream dejagnu suites
+for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
+ dir="$PTEST_DIR/testsuite/$suite"
+ [ -d "$dir" ] || continue
+
+ extra=""
+ [ "$suite" = "libffi.threads" ] && extra="-lpthread"
+
+ for src in "$dir"/*.c "$dir"/*.cc; do
+ [ -f "$src" ] || continue
+ grep -q "dg-do run" "$src" || continue
+
+ name=$(basename "${src%.*}")
+ case "$src" in
+ *.cc) cc="g++";;
+ *) cc="gcc";;
+ esac
+
+ if $cc $CFLAGS -o "$PTEST_DIR/$name" "$src" -lffi $extra 2>&1; then
+ if "$PTEST_DIR/$name" 2>&1; then
+ echo "PASS: $suite/$name"
+ else
+ echo "FAIL: $suite/$name"
+ fi
+ else
+ echo "SKIP: $suite/$name"
+ fi
+ rm -f "$PTEST_DIR/$name"
+ done
+done
diff --git a/meta/recipes-support/libffi/libffi_3.5.2.bb b/meta/recipes-support/libffi/libffi_3.5.2.bb
index d3aa90d429..ec2b8032d3 100644
--- a/meta/recipes-support/libffi/libffi_3.5.2.bb
+++ b/meta/recipes-support/libffi/libffi_3.5.2.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ce4763670c5b7756000561f9af1ab178"
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \
file://not-win32.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
@@ -19,7 +20,7 @@ EXTRA_OECONF = "--disable-builddir"
EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
-inherit autotools texinfo multilib_header github-releases
+inherit autotools texinfo multilib_header github-releases ptest
do_install:append() {
oe_multilib_header ffi.h ffitarget.h
@@ -30,3 +31,21 @@ do_install:append() {
MIPS_INSTRUCTION_SET = "mips"
BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite
+ for suite in libffi.bhaible libffi.call libffi.closures libffi.complex \
+ libffi.go libffi.threads; do
+ cp -r ${S}/testsuite/$suite ${D}${PTEST_PATH}/testsuite/
+ done
+
+ install -d ${D}${PTEST_PATH}/include
+ install -m 0644 ${B}/fficonfig.h ${D}${PTEST_PATH}/include/
+ install -m 0644 ${B}/include/ffi.h ${D}${PTEST_PATH}/include/
+ install -m 0644 ${B}/include/ffitarget.h ${D}${PTEST_PATH}/include/
+
+ install -d ${D}${PTEST_PATH}/lib
+ ln -sf ${libdir}/libffi.so.8 ${D}${PTEST_PATH}/lib/libffi.so
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-08 11:36 ` [OE-core][PATCH v3] " Pratik Farkase
@ 2026-05-11 6:09 ` Mathieu Dubois-Briand
2026-05-11 9:00 ` Pratik Farkase
0 siblings, 1 reply; 18+ messages in thread
From: Mathieu Dubois-Briand @ 2026-05-11 6:09 UTC (permalink / raw)
To: Pratik Farkase, openembedded-core; +Cc: pratik.farkase
On Fri May 8, 2026 at 1:36 PM CEST, Pratik Farkase wrote:
> Add ptest support for libffi using all upstream test suites: bhaible,
> call, closures, complex, go, and threads.
>
> Tests are compiled on-target against the installed libffi. Headers
> (including the generated fficonfig.h) and a linker symlink are installed
> in the ptest directory to avoid depending on libffi-dev.
>
> Tested on qemux86-64 with ptest-runner: 199 PASS, 0 FAIL, 2 SKIP (349s).
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---
Hi Pratik,
Thanks for the patch.
Do you have any clue about why this is triggering some selftest
failures? I'm a bit surprised by that, but I confirm it comes from this
patch:
2026-05-10 16:16:13,784 - oe-selftest - INFO - locales.LocalesTest.test_locales_off (subunit.RemotedTestCase)
2026-05-10 16:16:13,787 - oe-selftest - INFO - ... FAIL
...
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-c, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-el-gr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-en-gb, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-es-es, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-fa-ir, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-hr-hr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ja-jp.euc-jp, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-lt-lt, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl.iso-8859-2, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: Fatal QA errors were found, failing task.
...
2026-05-10 16:19:03,004 - oe-selftest - INFO - locales.LocalesTest.test_locales_on (subunit.RemotedTestCase)
2026-05-10 16:19:03,005 - oe-selftest - INFO - ... FAIL
...
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-c, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-el-gr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-en-gb, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-es-es, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-fa-ir, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-hr-hr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ja-jp.euc-jp, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-lt-lt, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl.iso-8859-2, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]
NOTE: Setscene tasks completed
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3929
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3827
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3696
I also note some is install error:
ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
...
Error: Transaction test error:
file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
Finally, I note a ptest failures (on riscv64). This one look like
intermittent, if it happens too often, we might want to exclude the
failing test:
Failed ptests:
{'libffi': ['libffi.complex/complex_int']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1576
I will try to run more tests, as again, I'm a bit surprised by some of
these failures.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-11 6:09 ` Mathieu Dubois-Briand
@ 2026-05-11 9:00 ` Pratik Farkase
2026-05-11 12:25 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 18+ messages in thread
From: Pratik Farkase @ 2026-05-11 9:00 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Hi Mathieu,
Thanks for looking into this.
The glib-2.0 locale issue looks pre-existing — my patch only modifies
ptest-packagelists.inc which likely invalidated sstate and exposed it.
The multilib symlinks conflict I can address in v4 if confirmed.
The complex_int failure on riscv64 could be arch-specific — happy to
exclude it if it reproduces consistently.
Let me know what you find after further testing.
Best Regards,
Pratik
________________________________________
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sent: Monday, May 11, 2026 8:09 AM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libffi: add ptest support
On Fri May 8, 2026 at 1:36 PM CEST, Pratik Farkase wrote:
> Add ptest support for libffi using all upstream test suites: bhaible,
> call, closures, complex, go, and threads.
>
> Tests are compiled on-target against the installed libffi. Headers
> (including the generated fficonfig.h) and a linker symlink are installed
> in the ptest directory to avoid depending on libffi-dev.
>
> Tested on qemux86-64 with ptest-runner: 199 PASS, 0 FAIL, 2 SKIP (349s).
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---
Hi Pratik,
Thanks for the patch.
Do you have any clue about why this is triggering some selftest
failures? I'm a bit surprised by that, but I confirm it comes from this
patch:
2026-05-10 16:16:13,784 - oe-selftest - INFO - locales.LocalesTest.test_locales_off (subunit.RemotedTestCase)
2026-05-10 16:16:13,787 - oe-selftest - INFO - ... FAIL
...
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-c, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-el-gr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-en-gb, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-es-es, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-fa-ir, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-hr-hr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ja-jp.euc-jp, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-lt-lt, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl.iso-8859-2, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: Fatal QA errors were found, failing task.
...
2026-05-10 16:19:03,004 - oe-selftest - INFO - locales.LocalesTest.test_locales_on (subunit.RemotedTestCase)
2026-05-10 16:19:03,005 - oe-selftest - INFO - ... FAIL
...
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-c, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-el-gr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-en-gb, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-es-es, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-fa-ir, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-hr-hr, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ja-jp.euc-jp, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-lt-lt, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-pl-pl.iso-8859-2, but it isn't a build dependency? [build-deps]
ERROR: glib-2.0-1_2.88.0-r0 do_package_qa: QA Issue: glib-2.0-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]
NOTE: Setscene tasks completed
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3929
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3827
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3696
I also note some is install error:
ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
...
Error: Transaction test error:
file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
Finally, I note a ptest failures (on riscv64). This one look like
intermittent, if it happens too often, we might want to exclude the
failing test:
Failed ptests:
{'libffi': ['libffi.complex/complex_int']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1576
I will try to run more tests, as again, I'm a bit surprised by some of
these failures.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-11 9:00 ` Pratik Farkase
@ 2026-05-11 12:25 ` Mathieu Dubois-Briand
2026-05-12 8:30 ` Pratik Farkase
0 siblings, 1 reply; 18+ messages in thread
From: Mathieu Dubois-Briand @ 2026-05-11 12:25 UTC (permalink / raw)
To: Pratik Farkase, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
On Mon May 11, 2026 at 11:00 AM CEST, Pratik Farkase wrote:
> Hi Mathieu,
>
> Thanks for looking into this.
>
> The glib-2.0 locale issue looks pre-existing — my patch only modifies
> ptest-packagelists.inc which likely invalidated sstate and exposed it.
>
> The multilib symlinks conflict I can address in v4 if confirmed.
>
> The complex_int failure on riscv64 could be arch-specific — happy to
> exclude it if it reproduces consistently.
>
> Let me know what you find after further testing.
>
> Best Regards,
> Pratik
>
So I tired again and applied this series on top of an otherwise fully
working branch. I basically got all the same failures:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1577
This does include the ptest one, so I believe we should disable the
'libffi.complex/complex_int' test.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-11 12:25 ` Mathieu Dubois-Briand
@ 2026-05-12 8:30 ` Pratik Farkase
2026-05-12 15:16 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 18+ messages in thread
From: Pratik Farkase @ 2026-05-12 8:30 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Hi Mathieu,
I tested v3 on qemux86-64 against current master and was unable to
reproduce the glib-2.0 locale or multilib symlinks failures.
Could you share the steps or configuration you used to reproduce the
these two issues? That would help me investigate further.
Best Regards,
Pratik
________________________________________
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sent: Monday, May 11, 2026 2:25 PM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libffi: add ptest support
On Mon May 11, 2026 at 11:00 AM CEST, Pratik Farkase wrote:
> Hi Mathieu,
>
> Thanks for looking into this.
>
> The glib-2.0 locale issue looks pre-existing — my patch only modifies
> ptest-packagelists.inc which likely invalidated sstate and exposed it.
>
> The multilib symlinks conflict I can address in v4 if confirmed.
>
> The complex_int failure on riscv64 could be arch-specific — happy to
> exclude it if it reproduces consistently.
>
> Let me know what you find after further testing.
>
> Best Regards,
> Pratik
>
So I tired again and applied this series on top of an otherwise fully
working branch. I basically got all the same failures:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1577
This does include the ptest one, so I believe we should disable the
'libffi.complex/complex_int' test.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-12 8:30 ` Pratik Farkase
@ 2026-05-12 15:16 ` Mathieu Dubois-Briand
2026-05-13 5:33 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 18+ messages in thread
From: Mathieu Dubois-Briand @ 2026-05-12 15:16 UTC (permalink / raw)
To: Pratik Farkase, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
On Tue May 12, 2026 at 10:30 AM CEST, Pratik Farkase wrote:
> Hi Mathieu,
>
> I tested v3 on qemux86-64 against current master and was unable to
> reproduce the glib-2.0 locale or multilib symlinks failures.
>
> Could you share the steps or configuration you used to reproduce the
> these two issues? That would help me investigate further.
>
> Best Regards,
> Pratik
>
Hi Pratik,
Regarding the multilib one, I just managed to reproduce it locally:
Using tag oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808 from
poky-ci-archive git:
https://git.yoctoproject.org/poky-ci-archive/tag/?h=oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808
Default local.conf template, with these lines added:
PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
OE_FRAGMENTS += 'core/yocto-autobuilder/multilib-x86-lib64'
SANITY_TESTED_DISTROS = ''
OEQA_TESTDISPLAY = ':1'
OE_FRAGMENTS += 'core/yocto-autobuilder/autobuilder core/yocto-autobuilder/autobuilder-resource-constraints'
EXTRA_IMAGE_FEATURES ?= 'allow-empty-password empty-root-password allow-root-login'
OE_FRAGMENTS += 'machine/qemux86 distro/poky'
Then:
bitbake lib64-core-image-sato-sdk
...
ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
...
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
I will try to reproduce the selftest failures.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-12 15:16 ` Mathieu Dubois-Briand
@ 2026-05-13 5:33 ` Mathieu Dubois-Briand
2026-05-13 8:27 ` Pratik Farkase
0 siblings, 1 reply; 18+ messages in thread
From: Mathieu Dubois-Briand @ 2026-05-13 5:33 UTC (permalink / raw)
To: Pratik Farkase, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
On Tue May 12, 2026 at 5:16 PM CEST, Mathieu Dubois-Briand wrote:
> On Tue May 12, 2026 at 10:30 AM CEST, Pratik Farkase wrote:
>> Hi Mathieu,
>>
>> I tested v3 on qemux86-64 against current master and was unable to
>> reproduce the glib-2.0 locale or multilib symlinks failures.
>>
>> Could you share the steps or configuration you used to reproduce the
>> these two issues? That would help me investigate further.
>>
>> Best Regards,
>> Pratik
>>
>
> Hi Pratik,
>
> Regarding the multilib one, I just managed to reproduce it locally:
>
> Using tag oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808 from
> poky-ci-archive git:
> https://git.yoctoproject.org/poky-ci-archive/tag/?h=oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808
>
> Default local.conf template, with these lines added:
> PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
> OE_FRAGMENTS += 'core/yocto-autobuilder/multilib-x86-lib64'
> SANITY_TESTED_DISTROS = ''
> OEQA_TESTDISPLAY = ':1'
> OE_FRAGMENTS += 'core/yocto-autobuilder/autobuilder core/yocto-autobuilder/autobuilder-resource-constraints'
> EXTRA_IMAGE_FEATURES ?= 'allow-empty-password empty-root-password allow-root-login'
> OE_FRAGMENTS += 'machine/qemux86 distro/poky'
>
> Then:
> bitbake lib64-core-image-sato-sdk
> ...
> ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
> ...
> Running transaction check
> Transaction check succeeded.
> Running transaction test
> Error: Transaction test error:
> file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
> file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
> file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
>
> I will try to reproduce the selftest failures.
>
I don't have the selftest issue locally. We can assume it is some sstate
pollution for now, we will go back to it later if it happens again.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-13 5:33 ` Mathieu Dubois-Briand
@ 2026-05-13 8:27 ` Pratik Farkase
2026-05-13 11:31 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 18+ messages in thread
From: Pratik Farkase @ 2026-05-13 8:27 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Hi Mathieu,
I was able to reproduce the multilib symlinks conflict locally with the same configuration. The root cause is that packagegroup-core-buildessential pulls in
gcc-symlinks, g++-symlinks, and cpp-symlinks which conflict in multilib images (both arches try to own /usr/bin/gcc).
The fix is to replace:
RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential"
with:
RDEPENDS:${PN}-ptest += "gcc g++ make"
And update run-ptest to find the compiler dynamically rather than hardcoding gcc/g++. I've verified this resolves the multilib conflict -lib64-core-image-sato-sdk builds cleanly with the fix applied.
Once you've had a chance to reproduce the glib-2.0 locale selftest issue, I'll send v4 addressing all three problems:
- glib-2.0 locale selftest issue
- Multilib symlinks conflict (use gcc/g++/make instead of packagegroup)
- complex_int exclusion (fails on riscv64)
Best Regards,
Pratik
________________________________________
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sent: Wednesday, May 13, 2026 7:33 AM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libffi: add ptest support
On Tue May 12, 2026 at 5:16 PM CEST, Mathieu Dubois-Briand wrote:
> On Tue May 12, 2026 at 10:30 AM CEST, Pratik Farkase wrote:
>> Hi Mathieu,
>>
>> I tested v3 on qemux86-64 against current master and was unable to
>> reproduce the glib-2.0 locale or multilib symlinks failures.
>>
>> Could you share the steps or configuration you used to reproduce the
>> these two issues? That would help me investigate further.
>>
>> Best Regards,
>> Pratik
>>
>
> Hi Pratik,
>
> Regarding the multilib one, I just managed to reproduce it locally:
>
> Using tag oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808 from
> poky-ci-archive git:
> https://git.yoctoproject.org/poky-ci-archive/tag/?h=oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808
>
> Default local.conf template, with these lines added:
> PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
> OE_FRAGMENTS += 'core/yocto-autobuilder/multilib-x86-lib64'
> SANITY_TESTED_DISTROS = ''
> OEQA_TESTDISPLAY = ':1'
> OE_FRAGMENTS += 'core/yocto-autobuilder/autobuilder core/yocto-autobuilder/autobuilder-resource-constraints'
> EXTRA_IMAGE_FEATURES ?= 'allow-empty-password empty-root-password allow-root-login'
> OE_FRAGMENTS += 'machine/qemux86 distro/poky'
>
> Then:
> bitbake lib64-core-image-sato-sdk
> ...
> ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
> ...
> Running transaction check
> Transaction check succeeded.
> Running transaction test
> Error: Transaction test error:
> file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
> file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
> file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
>
> I will try to reproduce the selftest failures.
>
I don't have the selftest issue locally. We can assume it is some sstate
pollution for now, we will go back to it later if it happens again.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-13 8:27 ` Pratik Farkase
@ 2026-05-13 11:31 ` Mathieu Dubois-Briand
2026-05-13 13:30 ` Pratik Farkase
0 siblings, 1 reply; 18+ messages in thread
From: Mathieu Dubois-Briand @ 2026-05-13 11:31 UTC (permalink / raw)
To: Pratik Farkase, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
On Wed May 13, 2026 at 10:27 AM CEST, Pratik Farkase wrote:
> Hi Mathieu,
>
> I was able to reproduce the multilib symlinks conflict locally with the same configuration. The root cause is that packagegroup-core-buildessential pulls in
> gcc-symlinks, g++-symlinks, and cpp-symlinks which conflict in multilib images (both arches try to own /usr/bin/gcc).
>
> The fix is to replace:
> RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential"
> with:
> RDEPENDS:${PN}-ptest += "gcc g++ make"
>
> And update run-ptest to find the compiler dynamically rather than hardcoding gcc/g++. I've verified this resolves the multilib conflict -lib64-core-image-sato-sdk builds cleanly with the fix applied.
Thanks.
>
> Once you've had a chance to reproduce the glib-2.0 locale selftest issue, I'll send v4 addressing all three problems:
> - glib-2.0 locale selftest issue
> - Multilib symlinks conflict (use gcc/g++/make instead of packagegroup)
> - complex_int exclusion (fails on riscv64)
I failed to do that yesterday, and I won't have time to look at this in
the coming days. As I said, it might be some other issue that just shows
here.
Send your v4 when you are ready, if we are a bit lucky we won't see this
issue anymore.
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> Sent: Wednesday, May 13, 2026 7:33 AM
> To: Pratik Farkase; openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com
> Subject: Re: [OE-core][PATCH v3] libffi: add ptest support
>
> On Tue May 12, 2026 at 5:16 PM CEST, Mathieu Dubois-Briand wrote:
>> On Tue May 12, 2026 at 10:30 AM CEST, Pratik Farkase wrote:
>>> Hi Mathieu,
>>>
>>> I tested v3 on qemux86-64 against current master and was unable to
>>> reproduce the glib-2.0 locale or multilib symlinks failures.
>>>
>>> Could you share the steps or configuration you used to reproduce the
>>> these two issues? That would help me investigate further.
>>>
>>> Best Regards,
>>> Pratik
>>>
>>
>> Hi Pratik,
>>
>> Regarding the multilib one, I just managed to reproduce it locally:
>>
>> Using tag oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808 from
>> poky-ci-archive git:
>> https://git.yoctoproject.org/poky-ci-archive/tag/?h=oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808
>>
>> Default local.conf template, with these lines added:
>> PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
>> OE_FRAGMENTS += 'core/yocto-autobuilder/multilib-x86-lib64'
>> SANITY_TESTED_DISTROS = ''
>> OEQA_TESTDISPLAY = ':1'
>> OE_FRAGMENTS += 'core/yocto-autobuilder/autobuilder core/yocto-autobuilder/autobuilder-resource-constraints'
>> EXTRA_IMAGE_FEATURES ?= 'allow-empty-password empty-root-password allow-root-login'
>> OE_FRAGMENTS += 'machine/qemux86 distro/poky'
>>
>> Then:
>> bitbake lib64-core-image-sato-sdk
>> ...
>> ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
>> ...
>> Running transaction check
>> Transaction check succeeded.
>> Running transaction test
>> Error: Transaction test error:
>> file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
>> file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
>> file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
>>
>> I will try to reproduce the selftest failures.
>>
>
> I don't have the selftest issue locally. We can assume it is some sstate
> pollution for now, we will go back to it later if it happens again.
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v3] libffi: add ptest support
2026-05-13 11:31 ` Mathieu Dubois-Briand
@ 2026-05-13 13:30 ` Pratik Farkase
0 siblings, 0 replies; 18+ messages in thread
From: Pratik Farkase @ 2026-05-13 13:30 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Hi Mathieu,
I have sent a v4 which addresses the issues you reported:
- Replaced packagegroup-core-buildessential with "gcc g++ make" to fix
the multilib symlinks conflict in lib64-core-image-sato-sdk
- Excluded complex_int test (fails on riscv64)
- Compiler is detected dynamically in run-ptest (works without symlinks)
Best Regards,
Pratik
________________________________________
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sent: Wednesday, May 13, 2026 1:31 PM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libffi: add ptest support
On Wed May 13, 2026 at 10:27 AM CEST, Pratik Farkase wrote:
> Hi Mathieu,
>
> I was able to reproduce the multilib symlinks conflict locally with the same configuration. The root cause is that packagegroup-core-buildessential pulls in
> gcc-symlinks, g++-symlinks, and cpp-symlinks which conflict in multilib images (both arches try to own /usr/bin/gcc).
>
> The fix is to replace:
> RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential"
> with:
> RDEPENDS:${PN}-ptest += "gcc g++ make"
>
> And update run-ptest to find the compiler dynamically rather than hardcoding gcc/g++. I've verified this resolves the multilib conflict -lib64-core-image-sato-sdk builds cleanly with the fix applied.
Thanks.
>
> Once you've had a chance to reproduce the glib-2.0 locale selftest issue, I'll send v4 addressing all three problems:
> - glib-2.0 locale selftest issue
> - Multilib symlinks conflict (use gcc/g++/make instead of packagegroup)
> - complex_int exclusion (fails on riscv64)
I failed to do that yesterday, and I won't have time to look at this in
the coming days. As I said, it might be some other issue that just shows
here.
Send your v4 when you are ready, if we are a bit lucky we won't see this
issue anymore.
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> Sent: Wednesday, May 13, 2026 7:33 AM
> To: Pratik Farkase; openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com
> Subject: Re: [OE-core][PATCH v3] libffi: add ptest support
>
> On Tue May 12, 2026 at 5:16 PM CEST, Mathieu Dubois-Briand wrote:
>> On Tue May 12, 2026 at 10:30 AM CEST, Pratik Farkase wrote:
>>> Hi Mathieu,
>>>
>>> I tested v3 on qemux86-64 against current master and was unable to
>>> reproduce the glib-2.0 locale or multilib symlinks failures.
>>>
>>> Could you share the steps or configuration you used to reproduce the
>>> these two issues? That would help me investigate further.
>>>
>>> Best Regards,
>>> Pratik
>>>
>>
>> Hi Pratik,
>>
>> Regarding the multilib one, I just managed to reproduce it locally:
>>
>> Using tag oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808 from
>> poky-ci-archive git:
>> https://git.yoctoproject.org/poky-ci-archive/tag/?h=oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3808
>>
>> Default local.conf template, with these lines added:
>> PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
>> OE_FRAGMENTS += 'core/yocto-autobuilder/multilib-x86-lib64'
>> SANITY_TESTED_DISTROS = ''
>> OEQA_TESTDISPLAY = ':1'
>> OE_FRAGMENTS += 'core/yocto-autobuilder/autobuilder core/yocto-autobuilder/autobuilder-resource-constraints'
>> EXTRA_IMAGE_FEATURES ?= 'allow-empty-password empty-root-password allow-root-login'
>> OE_FRAGMENTS += 'machine/qemux86 distro/poky'
>>
>> Then:
>> bitbake lib64-core-image-sato-sdk
>> ...
>> ERROR: lib64-core-image-sato-sdk-1.0-r0 do_rootfs: Could not invoke dnf. Command '...' returned 1:
>> ...
>> Running transaction check
>> Transaction check succeeded.
>> Running transaction test
>> Error: Transaction test error:
>> file /usr/bin/g++ conflicts between attempted installs of lib64-g++-symlinks-15.2.0-r0.x86_64 and g++-symlinks-15.2.0-r0.core2_32
>> file /usr/bin/cpp conflicts between attempted installs of cpp-symlinks-15.2.0-r0.core2_32 and lib64-cpp-symlinks-15.2.0-r0.x86_64
>> file /usr/bin/gcc conflicts between attempted installs of lib64-gcc-symlinks-15.2.0-r0.x86_64 and gcc-symlinks-15.2.0-r0.core2_32
>>
>> I will try to reproduce the selftest failures.
>>
>
> I don't have the selftest issue locally. We can assume it is some sstate
> pollution for now, we will go back to it later if it happens again.
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [OE-core][PATCH v4] libffi: add ptest support
2026-05-08 10:24 ` [OE-core][PATCH v2] " Pratik Farkase
2026-05-08 11:25 ` Marko, Peter
2026-05-08 11:36 ` [OE-core][PATCH v3] " Pratik Farkase
@ 2026-05-13 13:27 ` Pratik Farkase
2026-05-20 16:02 ` Ross Burton
2026-05-25 9:30 ` [OE-core][PATCH v5] " Pratik Farkase
3 siblings, 1 reply; 18+ messages in thread
From: Pratik Farkase @ 2026-05-13 13:27 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libffi using all upstream test suites: bhaible,
call, closures, complex, go, and threads.
Tests are compiled on-target against the installed libffi. Headers
(including the generated fficonfig.h) and a linker symlink are installed
in the ptest directory to avoid depending on libffi-dev.
The complex_int test is excluded as it uses non-standard _Complex int
which is unsupported on some architectures (e.g. riscv64).
Tested on qemux86-64 with ptest-runner: 198 PASS, 0 FAIL, 2 SKIP (327s).
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v4:
- Replace packagegroup-core-buildessential with gcc/g++/make to fix
multilib symlinks conflict in lib64-core-image-sato-sdk
- Detect compiler dynamically in run-ptest (works without symlinks)
- Exclude complex_int test (fails on riscv64)
Changes in v3:
- Move libffi from PTESTS_FAST to PTESTS_SLOW (349s) runtime
Changes in v2 :
- Include all upstream test suites instead of only bhaible
- Install fficonfig.h required by ffitest.h
- Add support for C++ tests (closures/unwindtest*.cc)
- Add -lpthread for threads suite
---
.../distro/include/ptest-packagelists.inc | 1 +
meta/recipes-support/libffi/libffi/run-ptest | 62 +++++++++++++++++++
meta/recipes-support/libffi/libffi_3.5.2.bb | 23 ++++++-
3 files changed, 84 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libffi/libffi/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 50b6a8a41e..68189ec2a3 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -126,6 +126,7 @@ PTESTS_SLOW = "\
less \
libevent \
libgcrypt \
+ libffi \
libmodule-build-perl \
libpng \
${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'libseccomp', '',d)} \
diff --git a/meta/recipes-support/libffi/libffi/run-ptest b/meta/recipes-support/libffi/libffi/run-ptest
new file mode 100755
index 0000000000..0a1845b2fd
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/run-ptest
@@ -0,0 +1,62 @@
+#!/bin/sh
+# SPDX-License-Identifier: MIT
+
+PTEST_DIR=$(cd "$(dirname "$0")" && pwd)
+CC="gcc"
+CXX="g++"
+if ! command -v gcc >/dev/null 2>&1; then
+ CC=$(find /usr/bin -name "*-gcc" | head -n 1)
+ CXX=$(find /usr/bin -name "*-g++" | head -n 1)
+fi
+CFLAGS="-O2 -Wall -I$PTEST_DIR/include -L$PTEST_DIR/lib"
+
+# bhaible tests validate by comparing paired output lines
+for t in test-call test-callback; do
+ src="$PTEST_DIR/testsuite/libffi.bhaible/$t.c"
+ if $CC $CFLAGS -o "$PTEST_DIR/$t" "$src" -lffi 2>&1; then
+ "$PTEST_DIR/$t" > "$PTEST_DIR/$t.out" 2>&1
+ if ! LC_ALL=C uniq -u < "$PTEST_DIR/$t.out" | grep -q .; then
+ echo "PASS: libffi.bhaible/$t"
+ else
+ echo "FAIL: libffi.bhaible/$t"
+ cat "$PTEST_DIR/$t.out"
+ fi
+ else
+ echo "SKIP: libffi.bhaible/$t"
+ fi
+ rm -f "$PTEST_DIR/$t" "$PTEST_DIR/$t.out"
+done
+
+# Individual test programs from upstream dejagnu suites
+for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
+ dir="$PTEST_DIR/testsuite/$suite"
+ [ -d "$dir" ] || continue
+
+ extra=""
+ [ "$suite" = "libffi.threads" ] && extra="-lpthread"
+
+ for src in "$dir"/*.c "$dir"/*.cc; do
+ [ -f "$src" ] || continue
+ grep -q "dg-do run" "$src" || continue
+
+ name=$(basename "${src%.*}")
+
+ # complex_int uses non-standard _Complex int, fails on some arches (riscv64)
+ [ "$name" = "complex_int" ] && continue
+ case "$src" in
+ *.cc) cc="$CXX";;
+ *) cc="$CC";;
+ esac
+
+ if $cc $CFLAGS -o "$PTEST_DIR/$name" "$src" -lffi $extra 2>&1; then
+ if "$PTEST_DIR/$name" 2>&1; then
+ echo "PASS: $suite/$name"
+ else
+ echo "FAIL: $suite/$name"
+ fi
+ else
+ echo "SKIP: $suite/$name"
+ fi
+ rm -f "$PTEST_DIR/$name"
+ done
+done
diff --git a/meta/recipes-support/libffi/libffi_3.5.2.bb b/meta/recipes-support/libffi/libffi_3.5.2.bb
index d3aa90d429..09d686acd9 100644
--- a/meta/recipes-support/libffi/libffi_3.5.2.bb
+++ b/meta/recipes-support/libffi/libffi_3.5.2.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ce4763670c5b7756000561f9af1ab178"
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \
file://not-win32.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
@@ -19,10 +20,10 @@ EXTRA_OECONF = "--disable-builddir"
EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
-inherit autotools texinfo multilib_header github-releases
+inherit autotools texinfo multilib_header github-releases ptest
do_install:append() {
- oe_multilib_header ffi.h ffitarget.h
+ oe_multilib_header ffi.h ffitarget.h
}
# Doesn't compile in MIPS16e mode due to use of hand-written
@@ -30,3 +31,21 @@ do_install:append() {
MIPS_INSTRUCTION_SET = "mips"
BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS:${PN}-ptest += "gcc g++ make"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite
+ for suite in libffi.bhaible libffi.call libffi.closures libffi.complex \
+ libffi.go libffi.threads; do
+ cp -r ${S}/testsuite/$suite ${D}${PTEST_PATH}/testsuite/
+ done
+
+ install -d ${D}${PTEST_PATH}/include
+ install -m 0644 ${B}/fficonfig.h ${D}${PTEST_PATH}/include/
+ install -m 0644 ${B}/include/ffi.h ${D}${PTEST_PATH}/include/
+ install -m 0644 ${B}/include/ffitarget.h ${D}${PTEST_PATH}/include/
+
+ install -d ${D}${PTEST_PATH}/lib
+ ln -sf ${libdir}/libffi.so.8 ${D}${PTEST_PATH}/lib/libffi.so
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v4] libffi: add ptest support
2026-05-13 13:27 ` [OE-core][PATCH v4] " Pratik Farkase
@ 2026-05-20 16:02 ` Ross Burton
2026-05-21 8:30 ` Pratik Farkase
0 siblings, 1 reply; 18+ messages in thread
From: Ross Burton @ 2026-05-20 16:02 UTC (permalink / raw)
To: pratik.farkase@est.tech
Cc: openembedded-core@lists.openembedded.org,
pratik.farkase@ericsson.com
On 13 May 2026, at 14:27, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
>
> Add ptest support for libffi using all upstream test suites: bhaible,
> call, closures, complex, go, and threads.
>
> Tests are compiled on-target against the installed libffi. Headers
> (including the generated fficonfig.h) and a linker symlink are installed
> in the ptest directory to avoid depending on libffi-dev.
The point of ptests is to do integration testing of what we build, which this does not do. As you’re manually doing the compilation in run-ptest, why can’t this be done at build time?
> +CC="gcc"
> +CXX="g++"
> +if ! command -v gcc >/dev/null 2>&1; then
> + CC=$(find /usr/bin -name "*-gcc" | head -n 1)
> + CXX=$(find /usr/bin -name "*-g++" | head -n 1)
> +fi
Please don’t be so overly defensive. If you were to continue with compilation on the target, then just RDEPEND on gcc-symlinks and then gcc is on PATH.
> +CFLAGS="-O2 -Wall -I$PTEST_DIR/include -L$PTEST_DIR/lib"
> +
> +# bhaible tests validate by comparing paired output lines
> +for t in test-call test-callback; do
> + src="$PTEST_DIR/testsuite/libffi.bhaible/$t.c"
> + if $CC $CFLAGS -o "$PTEST_DIR/$t" "$src" -lffi 2>&1; then
> + "$PTEST_DIR/$t" > "$PTEST_DIR/$t.out" 2>&1
> + if ! LC_ALL=C uniq -u < "$PTEST_DIR/$t.out" | grep -q .; then
> + echo "PASS: libffi.bhaible/$t"
> + else
> + echo "FAIL: libffi.bhaible/$t"
> + cat "$PTEST_DIR/$t.out"
> + fi
> + else
> + echo "SKIP: libffi.bhaible/$t"
> + fi
> + rm -f "$PTEST_DIR/$t" "$PTEST_DIR/$t.out"
> +done
> +
> +# Individual test programs from upstream dejagnu suites
> +for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
> + dir="$PTEST_DIR/testsuite/$suite"
> + [ -d "$dir" ] || continue
> +
> + extra=""
> + [ "$suite" = "libffi.threads" ] && extra="-lpthread"
> +
> + for src in "$dir"/*.c "$dir"/*.cc; do
> + [ -f "$src" ] || continue
> + grep -q "dg-do run" "$src" || continue
> +
> + name=$(basename "${src%.*}")
> +
> + # complex_int uses non-standard _Complex int, fails on some arches (riscv64)
> + [ "$name" = "complex_int" ] && continue
> + case "$src" in
> + *.cc) cc="$CXX";;
> + *) cc="$CC";;
> + esac
> +
> + if $cc $CFLAGS -o "$PTEST_DIR/$name" "$src" -lffi $extra 2>&1; then
> + if "$PTEST_DIR/$name" 2>&1; then
> + echo "PASS: $suite/$name"
> + else
> + echo "FAIL: $suite/$name"
> + fi
> + else
> + echo "SKIP: $suite/$name"
> + fi
> + rm -f "$PTEST_DIR/$name"
> + done
> +done
This is a _lot_ of logic that we have to maintain forever to run some integration tests…
Ross
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [OE-core][PATCH v4] libffi: add ptest support
2026-05-20 16:02 ` Ross Burton
@ 2026-05-21 8:30 ` Pratik Farkase
0 siblings, 0 replies; 18+ messages in thread
From: Pratik Farkase @ 2026-05-21 8:30 UTC (permalink / raw)
To: Ross Burton
Cc: openembedded-core@lists.openembedded.org,
pratik.farkase@ericsson.com
Hi Ross,
I initially compiled on target thinking it would better to test against the installed library and headers as the user would see them. The tests just validate libffi's functionality, which works the same whether compiled at build time or on target but yes it then does makes the code more complex and hard to maintain too i agree.
I'll rework this to compile the tests at build time in do_compile_ptest and just install the binaries so that run-ptest has minimalistic work to do.
Will send v5 once I've simplified and tested it.
Best Regards,
Pratik
________________________________________
From: Ross Burton <Ross.Burton@arm.com>
Sent: Wednesday, May 20, 2026 6:02 PM
To: Pratik Farkase
Cc: openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v4] libffi: add ptest support
On 13 May 2026, at 14:27, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
>
> Add ptest support for libffi using all upstream test suites: bhaible,
> call, closures, complex, go, and threads.
>
> Tests are compiled on-target against the installed libffi. Headers
> (including the generated fficonfig.h) and a linker symlink are installed
> in the ptest directory to avoid depending on libffi-dev.
The point of ptests is to do integration testing of what we build, which this does not do. As you’re manually doing the compilation in run-ptest, why can’t this be done at build time?
> +CC="gcc"
> +CXX="g++"
> +if ! command -v gcc >/dev/null 2>&1; then
> + CC=$(find /usr/bin -name "*-gcc" | head -n 1)
> + CXX=$(find /usr/bin -name "*-g++" | head -n 1)
> +fi
Please don’t be so overly defensive. If you were to continue with compilation on the target, then just RDEPEND on gcc-symlinks and then gcc is on PATH.
> +CFLAGS="-O2 -Wall -I$PTEST_DIR/include -L$PTEST_DIR/lib"
> +
> +# bhaible tests validate by comparing paired output lines
> +for t in test-call test-callback; do
> + src="$PTEST_DIR/testsuite/libffi.bhaible/$t.c"
> + if $CC $CFLAGS -o "$PTEST_DIR/$t" "$src" -lffi 2>&1; then
> + "$PTEST_DIR/$t" > "$PTEST_DIR/$t.out" 2>&1
> + if ! LC_ALL=C uniq -u < "$PTEST_DIR/$t.out" | grep -q .; then
> + echo "PASS: libffi.bhaible/$t"
> + else
> + echo "FAIL: libffi.bhaible/$t"
> + cat "$PTEST_DIR/$t.out"
> + fi
> + else
> + echo "SKIP: libffi.bhaible/$t"
> + fi
> + rm -f "$PTEST_DIR/$t" "$PTEST_DIR/$t.out"
> +done
> +
> +# Individual test programs from upstream dejagnu suites
> +for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
> + dir="$PTEST_DIR/testsuite/$suite"
> + [ -d "$dir" ] || continue
> +
> + extra=""
> + [ "$suite" = "libffi.threads" ] && extra="-lpthread"
> +
> + for src in "$dir"/*.c "$dir"/*.cc; do
> + [ -f "$src" ] || continue
> + grep -q "dg-do run" "$src" || continue
> +
> + name=$(basename "${src%.*}")
> +
> + # complex_int uses non-standard _Complex int, fails on some arches (riscv64)
> + [ "$name" = "complex_int" ] && continue
> + case "$src" in
> + *.cc) cc="$CXX";;
> + *) cc="$CC";;
> + esac
> +
> + if $cc $CFLAGS -o "$PTEST_DIR/$name" "$src" -lffi $extra 2>&1; then
> + if "$PTEST_DIR/$name" 2>&1; then
> + echo "PASS: $suite/$name"
> + else
> + echo "FAIL: $suite/$name"
> + fi
> + else
> + echo "SKIP: $suite/$name"
> + fi
> + rm -f "$PTEST_DIR/$name"
> + done
> +done
This is a _lot_ of logic that we have to maintain forever to run some integration tests…
Ross
^ permalink raw reply [flat|nested] 18+ messages in thread
* [OE-core][PATCH v5] libffi: add ptest support
2026-05-08 10:24 ` [OE-core][PATCH v2] " Pratik Farkase
` (2 preceding siblings ...)
2026-05-13 13:27 ` [OE-core][PATCH v4] " Pratik Farkase
@ 2026-05-25 9:30 ` Pratik Farkase
3 siblings, 0 replies; 18+ messages in thread
From: Pratik Farkase @ 2026-05-25 9:30 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libffi using all upstream test suites: bhaible,
call, closures, complex, go, and threads.
Tests are cross-compiled at build time in do_compile_ptest and the
binaries are installed to the ptest directory. No toolchain is needed
on target.
The complex_int test is excluded as it uses non-standard _Complex int
which is unsupported on some architectures (e.g. riscv64).
Tested on qemux86-64 with ptest-runner: 198 PASS, 0 FAIL (5s).
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v5:
- Cross-compile tests at build time instead of on target
- Minimal run-ptest that just executes pre-compiled binaries
- Moved back to PTESTS_FAST (5s runtime vs 327s previously)
Changes in v4:
- Replace packagegroup-core-buildessential with gcc/g++/make to fix
multilib symlinks conflict in lib64-core-image-sato-sdk
- Detect compiler dynamically in run-ptest (works without symlinks)
- Exclude complex_int test (fails on riscv64)
Changes in v3:
- Move libffi from PTESTS_FAST to PTESTS_SLOW (349s) runtime
Changes in v2 :
- Include all upstream test suites instead of only bhaible
- Install fficonfig.h required by ffitest.h
- Add support for C++ tests (closures/unwindtest*.cc)
- Add -lpthread for threads suite
---
.../distro/include/ptest-packagelists.inc | 1 +
meta/recipes-support/libffi/libffi/run-ptest | 31 ++++++++++++++
meta/recipes-support/libffi/libffi_3.5.2.bb | 42 ++++++++++++++++++-
3 files changed, 73 insertions(+), 1 deletion(-)
create mode 100755 meta/recipes-support/libffi/libffi/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 50b6a8a41e..79b541a199 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -34,6 +34,7 @@ PTESTS_FAST = "\
libconfig \
libconvert-asn1-perl \
libexif \
+ libffi \
libgpg-error\
libksba \
libmd \
diff --git a/meta/recipes-support/libffi/libffi/run-ptest b/meta/recipes-support/libffi/libffi/run-ptest
new file mode 100755
index 0000000000..f25366111d
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/run-ptest
@@ -0,0 +1,31 @@
+#!/bin/sh
+# SPDX-License-Identifier: MIT
+
+cd "$(dirname "$0")/tests" || exit 1
+
+for t in *; do
+ [ -x "$t" ] || continue
+
+ suite="${t%%__*}"
+ name="${t#*__}"
+
+ case "$suite" in
+ libffi.bhaible)
+ ./"$t" > "$t.out" 2>&1
+ if ! LC_ALL=C uniq -u < "$t.out" | grep -q .; then
+ echo "PASS: $suite/$name"
+ else
+ echo "FAIL: $suite/$name"
+ cat "$t.out"
+ fi
+ rm -f "$t.out"
+ ;;
+ *)
+ if ./"$t" 2>&1; then
+ echo "PASS: $suite/$name"
+ else
+ echo "FAIL: $suite/$name"
+ fi
+ ;;
+ esac
+done
diff --git a/meta/recipes-support/libffi/libffi_3.5.2.bb b/meta/recipes-support/libffi/libffi_3.5.2.bb
index d3aa90d429..987d0f59c9 100644
--- a/meta/recipes-support/libffi/libffi_3.5.2.bb
+++ b/meta/recipes-support/libffi/libffi_3.5.2.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ce4763670c5b7756000561f9af1ab178"
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \
file://not-win32.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
@@ -19,7 +20,7 @@ EXTRA_OECONF = "--disable-builddir"
EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
-inherit autotools texinfo multilib_header github-releases
+inherit autotools texinfo multilib_header github-releases ptest
do_install:append() {
oe_multilib_header ffi.h ffitarget.h
@@ -30,3 +31,42 @@ do_install:append() {
MIPS_INSTRUCTION_SET = "mips"
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ mkdir -p ${B}/ptest-bins
+ cd ${S}/testsuite
+
+ for suite in libffi.call libffi.closures libffi.complex libffi.go libffi.threads; do
+ [ -d $suite ] || continue
+ extra=""
+ [ "$suite" = "libffi.threads" ] && extra="-lpthread"
+
+ for src in $suite/*.c $suite/*.cc; do
+ [ -f "$src" ] || continue
+ grep -q "dg-do run" "$src" || continue
+ name=$(basename "${src%.*}")
+ [ "$name" = "complex_int" ] && continue
+ case "$src" in
+ *.cc) compiler="${CXX}";;
+ *) compiler="${CC}";;
+ esac
+ $compiler ${CFLAGS} ${LDFLAGS} \
+ -I${B}/include -I${B} -I${S}/testsuite/libffi.call \
+ -o ${B}/ptest-bins/${suite}__${name} "$src" \
+ -L${B}/.libs -lffi $extra 2>/dev/null || true
+ done
+ done
+
+ for t in test-call test-callback; do
+ ${CC} ${CFLAGS} ${LDFLAGS} -I${B}/include -I${B} \
+ -o ${B}/ptest-bins/libffi.bhaible__${t} \
+ libffi.bhaible/${t}.c -L${B}/.libs -lffi || true
+ done
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for t in ${B}/ptest-bins/*; do
+ [ -f "$t" ] && install -m 0755 "$t" ${D}${PTEST_PATH}/tests/
+ done
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread