* [PATCH V2] procps: support ptest when TCLIBC is glibc
@ 2026-01-16 9:27 changqing.li
2026-01-26 13:01 ` [OE-core] " Ross Burton
0 siblings, 1 reply; 10+ messages in thread
From: changqing.li @ 2026-01-16 9:27 UTC (permalink / raw)
To: openembedded-core
From: Changqing Li <changqing.li@windriver.com>
* support ptest for procps TCLIBC is glibc. The configure.ac only match
LINUX as "linux-gnu", we can patch it to make test can run on musl lib
system, but the upstream testsuite should only run on gnu libc host,
some test cases only suitable for glibc, eg: Some of the error messages
for free command on musl system is not the same as glibc system, which
will make test failed. In order to avoid some other unexpected failure,
just support ptest for glibc.
* procps's testsuite use DejaGnu test framework. The testsuite is
expected to run during build time, this implementation create the same
folder structure as the testsuite expected to make it can work well.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
.../distro/include/ptest-packagelists.inc | 2 +
meta/recipes-extended/procps/procps/run-ptest | 7 +++
meta/recipes-extended/procps/procps_4.0.5.bb | 51 ++++++++++++++++++-
3 files changed, 58 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/procps/procps/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index fff2947177..2391224527 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -57,6 +57,7 @@ PTESTS_FAST = "\
nettle \
opkg \
popt \
+ procps \
python3-atomicwrites \
python3-attrs \
python3-bcrypt \
@@ -97,6 +98,7 @@ PTESTS_FAST:remove:mips64 = "qemu"
PTESTS_PROBLEMS:append:mips64 = " qemu"
PTESTS_FAST:remove:riscv32 = "qemu"
PTESTS_PROBLEMS:append:riscv32 = " qemu"
+PTESTS_FAST:remove:libc-musl = "procps"
PTESTS_SLOW = "\
apr \
diff --git a/meta/recipes-extended/procps/procps/run-ptest b/meta/recipes-extended/procps/procps/run-ptest
new file mode 100644
index 0000000000..0a74907fcc
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cd ./testsuite
+for tool in @DEJATOOL@;do
+ runtest -a --tool $tool --outdir ../log
+done
+
diff --git a/meta/recipes-extended/procps/procps_4.0.5.bb b/meta/recipes-extended/procps/procps_4.0.5.bb
index 0e0e06f0d2..d39bb5062f 100644
--- a/meta/recipes-extended/procps/procps_4.0.5.bb
+++ b/meta/recipes-extended/procps/procps_4.0.5.bb
@@ -10,12 +10,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
DEPENDS = "ncurses"
-inherit autotools gettext pkgconfig update-alternatives
+inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master;tag=v${PV} \
file://sysctl.conf \
file://top_large_pid_fix.patch \
"
+SRC_URI:append:libc-glibc = " file://run-ptest"
+
SRCREV = "f46b2f7929cdfe2913ed0a7f585b09d6adbf994e"
# Upstream has a custom autogen.sh which invokes po/update-potfiles as they
@@ -47,8 +49,51 @@ do_install:append () {
fi
}
-CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
+do_compile_ptest() {
+ oe_runmake -C testsuite site.exp
+ oe_runmake src/tests/test_process src/tests/test_strutils src/tests/test_fileutils src/tests/test_shm
+ DEJATOOL=$(make -C testsuite -s -f Makefile -f - <<'EOF'
+all:
+ $(info $(DEJATOOL))
+EOF
+)
+ echo $DEJATOOL > ${B}/testsuite/.dejatool
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite
+ install -d ${D}${PTEST_PATH}/src
+ install -d ${D}${PTEST_PATH}/log
+
+ cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+ cp -r ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+ cp -r ${B}/src/tests ${D}${PTEST_PATH}/src/
+
+ rm -rf ${D}${PTEST_PATH}/testsuite/Makefile*
+ rm -rf ${D}${PTEST_PATH}/testsuite/README
+ find ${D}${PTEST_PATH}/testsuite/ -type f -name "*.o" -exec rm -f {} +
+ find ${D}${PTEST_PATH}/src/ -type f -name "*.o" -exec rm -f {} +
+
+ sed -i -e "/set srcdir/c\set srcdir ${PTEST_PATH}/testsuite" \
+ -e "/set objdir/c\set objdir ${PTEST_PATH}/testsuite" ${D}${PTEST_PATH}/testsuite/site.exp
+
+ DEJATOOL=$(cat ${B}/testsuite/.dejatool)
+ sed -i -e "s#@DEJATOOL@#$DEJATOOL#g" ${D}${PTEST_PATH}/run-ptest
+ for p in $DEJATOOL; do
+ if [ "$p" = "ps" ]; then
+ install -d ${D}${PTEST_PATH}/src/ps
+ ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
+ elif [ "$p" = "sysctl" ]; then
+ ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
+ elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
+ ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
+ else
+ ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
+ fi
+ done
+}
+CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
base_bindir_progs += "kill pidof ps watch"
base_sbindir_progs += "sysctl"
@@ -80,6 +125,8 @@ RDEPENDS:${PN} += "${PROCPS_PACKAGES}"
RDEPENDS:${PN}-ps += "${PN}-lib"
RDEPENDS:${PN}-sysctl += "${PN}-lib"
+RDEPENDS:${PN}-ptest += "dejagnu bash glibc-utils"
+
FILES:${PN}-lib = "${libdir}"
FILES:${PN}-ps = "${base_bindir}/ps.${BPN}"
FILES:${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d"
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [OE-core] [PATCH V2] procps: support ptest when TCLIBC is glibc
2026-01-16 9:27 [PATCH V2] procps: support ptest when TCLIBC is glibc changqing.li
@ 2026-01-26 13:01 ` Ross Burton
2026-01-27 8:57 ` Changqing Li
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ross Burton @ 2026-01-26 13:01 UTC (permalink / raw)
To: changqing.li@windriver.com; +Cc: openembedded-core@lists.openembedded.org
On 16 Jan 2026, at 09:27, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
> +SRC_URI:append:libc-glibc = " file://run-ptest"
Keep things simple and just add this to SRC_URI, it won’t cause any problems in musl builds.
> + DEJATOOL=$(make -C testsuite -s -f Makefile -f - <<'EOF'
> +all:
> + $(info $(DEJATOOL))
> +EOF
> +)
You can use makefile-getvar (oe-core/scripts) for this, and do it later.
> + rm -rf ${D}${PTEST_PATH}/testsuite/Makefile*
> + rm -rf ${D}${PTEST_PATH}/testsuite/README
> + find ${D}${PTEST_PATH}/testsuite/ -type f -name "*.o" -exec rm -f {} +
> + find ${D}${PTEST_PATH}/src/ -type f -name "*.o" -exec rm -f {} +
Might be easier to use makefile-getvar to get the list of tests and then install them directly, instead of copying * and then deleting files.
Also find has a -delete option which is better than -exec rm.
> + DEJATOOL=$(cat ${B}/testsuite/.dejatool)
Just use makefile-getvar here?
> + sed -i -e "s#@DEJATOOL@#$DEJATOOL#g" ${D}${PTEST_PATH}/run-ptest
> + for p in $DEJATOOL; do
> + if [ "$p" = "ps" ]; then
> + install -d ${D}${PTEST_PATH}/src/ps
> + ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
> + elif [ "$p" = "sysctl" ]; then
> + ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
> + elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
> + ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
> + else
> + ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
> + fi
> + done
Not sure I understand the point of iterating a list and then switching off each item in the list. Why not just make all those symlinks without the loop and conditional?
> +RDEPENDS:${PN}-ptest += "dejagnu bash glibc-utils"
Have you verified that it _needs_ bash and we can’t send a little patch to use sh?
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [OE-core] [PATCH V2] procps: support ptest when TCLIBC is glibc
2026-01-26 13:01 ` [OE-core] " Ross Burton
@ 2026-01-27 8:57 ` Changqing Li
2026-01-27 8:58 ` [PATCH V3] " changqing.li
[not found] ` <188E8AC794A362CA.3302988@lists.openembedded.org>
2 siblings, 0 replies; 10+ messages in thread
From: Changqing Li @ 2026-01-27 8:57 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core@lists.openembedded.org
[-- Attachment #1: Type: text/plain, Size: 3083 bytes --]
On 1/26/26 21:01, Ross Burton wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 16 Jan 2026, at 09:27, Changqing Li via lists.openembedded.org<changqing.li=windriver.com@lists.openembedded.org> wrote:
>> +SRC_URI:append:libc-glibc =" file://run-ptest"
> Keep things simple and just add this to SRC_URI, it won’t cause any problems in musl builds.
OK
>
>> + DEJATOOL=$(make -C testsuite -s -f Makefile -f - <<'EOF'
>> +all:
>> + $(info $(DEJATOOL))
>> +EOF
>> +)
> You can use makefile-getvar (oe-core/scripts) for this, and do it later.
Corrected in V3, this script is much better.
>
>> + rm -rf ${D}${PTEST_PATH}/testsuite/Makefile*
>> + rm -rf ${D}${PTEST_PATH}/testsuite/README
>> + find ${D}${PTEST_PATH}/testsuite/ -type f -name "*.o" -exec rm -f {} +
>> + find ${D}${PTEST_PATH}/src/ -type f -name "*.o" -exec rm -f {} +
> Might be easier to use makefile-getvar to get the list of tests and then install them directly, instead of copying * and then deleting files.
>
> Also find has a -delete option which is better than -exec rm.
>
>> + DEJATOOL=$(cat ${B}/testsuite/.dejatool)
> Just use makefile-getvar here?
All changed to use makefile-getvar in V3, but for sources under
${S}/testsuites still cp them all, but don't remove unless Makefile.am/in,
because we not only need to install something can be got by
makefile-getvar, but also some config files/folder that only directly
used by *.exp.
>
>> + sed -i -e "s#@DEJATOOL@#$DEJATOOL#g" ${D}${PTEST_PATH}/run-ptest
>> + for p in $DEJATOOL; do
>> + if [ "$p" = "ps" ]; then
>> + install -d ${D}${PTEST_PATH}/src/ps
>> + ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
>> + elif [ "$p" = "sysctl" ]; then
>> + ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
>> + elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
>> + ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
>> + else
>> + ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
>> + fi
>> + done
> Not sure I understand the point of iterating a list and then switching off each item in the list. Why not just make all those symlinks without the loop and conditional?
Because most of the DEJATOOL should match the else branch, but
sysctl/kill/pidof/watch has different install path, not binddir, but
base_sbindir/base_bindir.
For ps, the ps.exp want to run "src/ps/pscommand", but not src/ps like
other programs, so I need to make the link different with others.
>
>> +RDEPENDS:${PN}-ptest += "dejagnu bash glibc-utils"
> Have you verified that it _needs_ bash and we can’t send a little patch to use sh?
I added this since I met error that reminds this depends, but it seems
not need any more, maybe the depends has been removed during rework this
patch.
Thanks
Changqing
>
> Ross
[-- Attachment #2: Type: text/html, Size: 5832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH V3] procps: support ptest when TCLIBC is glibc
2026-01-26 13:01 ` [OE-core] " Ross Burton
2026-01-27 8:57 ` Changqing Li
@ 2026-01-27 8:58 ` changqing.li
2026-01-28 11:32 ` [OE-core] " Richard Purdie
[not found] ` <188E8AC794A362CA.3302988@lists.openembedded.org>
2 siblings, 1 reply; 10+ messages in thread
From: changqing.li @ 2026-01-27 8:58 UTC (permalink / raw)
To: openembedded-core
From: Changqing Li <changqing.li@windriver.com>
* support ptest for procps TCLIBC is glibc. The configure.ac only match
LINUX as "linux-gnu", we can patch it to make test can run on musl lib
system, but the upstream testsuite should only run on gnu libc host,
some test cases only suitable for glibc, eg: Some of the error messages
for free command on musl system is not the same as glibc system, which
will make test failed. In order to avoid some other unexpected failure,
just support ptest for glibc.
* procps's testsuite use DejaGnu test framework. The testsuite is
expected to run during build time, this implementation create the same
folder structure as the testsuite expected to make it can work well.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
.../distro/include/ptest-packagelists.inc | 2 +
meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
meta/recipes-extended/procps/procps_4.0.5.bb | 57 ++++++++++++++++++-
3 files changed, 81 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/procps/procps/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index fff2947177..2391224527 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -57,6 +57,7 @@ PTESTS_FAST = "\
nettle \
opkg \
popt \
+ procps \
python3-atomicwrites \
python3-attrs \
python3-bcrypt \
@@ -97,6 +98,7 @@ PTESTS_FAST:remove:mips64 = "qemu"
PTESTS_PROBLEMS:append:mips64 = " qemu"
PTESTS_FAST:remove:riscv32 = "qemu"
PTESTS_PROBLEMS:append:riscv32 = " qemu"
+PTESTS_FAST:remove:libc-musl = "procps"
PTESTS_SLOW = "\
apr \
diff --git a/meta/recipes-extended/procps/procps/run-ptest b/meta/recipes-extended/procps/procps/run-ptest
new file mode 100644
index 0000000000..7e132653b0
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/run-ptest
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Run testsuite which use dejagnu
+cd ./testsuite
+for tool in @DEJATOOL@; do
+ runtest -a --tool $tool --outdir ../log
+done
+cd -
+
+# Run test programs not used by dejagnu but run directly
+for p in @TESTS@; do
+ ./src/tests/"$p" > ./log/"$p".log 2>&1
+ case "$?" in
+ 0)
+ echo "PASS: $p"
+ ;;
+ 77)
+ echo "SKIP: $p"
+ ;;
+ *)
+ echo "FAIL: $p"
+ ;;
+ esac
+done
diff --git a/meta/recipes-extended/procps/procps_4.0.5.bb b/meta/recipes-extended/procps/procps_4.0.5.bb
index 0e0e06f0d2..cddb79cf10 100644
--- a/meta/recipes-extended/procps/procps_4.0.5.bb
+++ b/meta/recipes-extended/procps/procps_4.0.5.bb
@@ -10,11 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
DEPENDS = "ncurses"
-inherit autotools gettext pkgconfig update-alternatives
+inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master;tag=v${PV} \
file://sysctl.conf \
file://top_large_pid_fix.patch \
+ file://run-ptest \
"
SRCREV = "f46b2f7929cdfe2913ed0a7f585b09d6adbf994e"
@@ -47,8 +48,58 @@ do_install:append () {
fi
}
-CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
+do_compile_ptest() {
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS); do
+ oe_runmake $p
+ done
+ oe_runmake -C testsuite site.exp
+}
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite
+ install -d ${D}${PTEST_PATH}/src/tests
+ install -d ${D}${PTEST_PATH}/log
+
+ install -m644 ${B}/testsuite/site.exp ${D}${PTEST_PATH}/testsuite/
+ for p in $(makefile-getvar ${B}/testsuite/Makefile noinst_PROGRAMS); do
+ install -m755 ${B}/testsuite/$p ${D}${PTEST_PATH}/testsuite/
+ done
+ cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS);do
+ case "$p" in
+ src/tests/*)
+ install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/ ;;
+ library/tests/*)
+ install -m 0755 ${B}/library/tests/.libs/$(basename $p) ${D}${PTEST_PATH}/src/tests/ ;;
+ esac
+ done
+
+ tests=""
+ for p in $(makefile-getvar ${B}/Makefile TESTS); do
+ tests="$tests $(basename $p)"
+ done
+ sed -i -e "s#@TESTS@#$tests#" ${D}${PTEST_PATH}/run-ptest
+
+ sed -i -e "/set srcdir/c\set srcdir ${PTEST_PATH}/testsuite" \
+ -e "/set objdir/c\set objdir ${PTEST_PATH}/testsuite" ${D}${PTEST_PATH}/testsuite/site.exp
+
+ sed -i -e "s#@DEJATOOL@#$(makefile-getvar ${B}/testsuite/Makefile DEJATOOL)#" ${D}${PTEST_PATH}/run-ptest
+ for p in $(makefile-getvar ${B}/testsuite/Makefile DEJATOOL); do
+ if [ "$p" = "ps" ]; then
+ install -d ${D}${PTEST_PATH}/src/ps
+ ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
+ elif [ "$p" = "sysctl" ]; then
+ ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
+ elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
+ ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
+ else
+ ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
+ fi
+ done
+}
+
+CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
base_bindir_progs += "kill pidof ps watch"
base_sbindir_progs += "sysctl"
@@ -80,6 +131,8 @@ RDEPENDS:${PN} += "${PROCPS_PACKAGES}"
RDEPENDS:${PN}-ps += "${PN}-lib"
RDEPENDS:${PN}-sysctl += "${PN}-lib"
+RDEPENDS:${PN}-ptest += "dejagnu glibc-utils"
+
FILES:${PN}-lib = "${libdir}"
FILES:${PN}-ps = "${base_bindir}/ps.${BPN}"
FILES:${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d"
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [OE-core] [PATCH V3] procps: support ptest when TCLIBC is glibc
2026-01-27 8:58 ` [PATCH V3] " changqing.li
@ 2026-01-28 11:32 ` Richard Purdie
2026-01-29 7:39 ` Changqing Li
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Richard Purdie @ 2026-01-28 11:32 UTC (permalink / raw)
To: changqing.li, openembedded-core
On Tue, 2026-01-27 at 16:58 +0800, Changqing Li via lists.openembedded.org wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> * support ptest for procps TCLIBC is glibc. The configure.ac only match
> LINUX as "linux-gnu", we can patch it to make test can run on musl lib
> system, but the upstream testsuite should only run on gnu libc host,
> some test cases only suitable for glibc, eg: Some of the error messages
> for free command on musl system is not the same as glibc system, which
> will make test failed. In order to avoid some other unexpected failure,
> just support ptest for glibc.
>
> * procps's testsuite use DejaGnu test framework. The testsuite is
> expected to run during build time, this implementation create the same
> folder structure as the testsuite expected to make it can work well.
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
> .../distro/include/ptest-packagelists.inc | 2 +
> meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
> meta/recipes-extended/procps/procps_4.0.5.bb | 57 ++++++++++++++++++-
> 3 files changed, 81 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-extended/procps/procps/run-ptest
This might trigger a ptest warning:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2990
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [OE-core] [PATCH V3] procps: support ptest when TCLIBC is glibc
2026-01-28 11:32 ` [OE-core] " Richard Purdie
@ 2026-01-29 7:39 ` Changqing Li
2026-01-29 7:48 ` [PATCH V4] " changqing.li
[not found] ` <188F2427284C7A56.4057262@lists.openembedded.org>
2 siblings, 0 replies; 10+ messages in thread
From: Changqing Li @ 2026-01-29 7:39 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
On 1/28/26 19:32, Richard Purdie wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue, 2026-01-27 at 16:58 +0800, Changqing Li via lists.openembedded.org wrote:
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> * support ptest for procps TCLIBC is glibc. The configure.ac only match
>> LINUX as "linux-gnu", we can patch it to make test can run on musl lib
>> system, but the upstream testsuite should only run on gnu libc host,
>> some test cases only suitable for glibc, eg: Some of the error messages
>> for free command on musl system is not the same as glibc system, which
>> will make test failed. In order to avoid some other unexpected failure,
>> just support ptest for glibc.
>>
>> * procps's testsuite use DejaGnu test framework. The testsuite is
>> expected to run during build time, this implementation create the same
>> folder structure as the testsuite expected to make it can work well.
>>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>> .../distro/include/ptest-packagelists.inc | 2 +
>> meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
>> meta/recipes-extended/procps/procps_4.0.5.bb | 57 ++++++++++++++++++-
>> 3 files changed, 81 insertions(+), 2 deletions(-)
>> create mode 100644 meta/recipes-extended/procps/procps/run-ptest
> This might trigger a ptest warning:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2990
There are two test cases may run failed randomly. it run "pmap -X pid
pid", and it expects the same total,
but it is possible that the memory changes between the two walks of
mypid's memory. I opened an issue upstream,
and send a V4 patch, set these two case as XFAIL.
Regards
//changqing
>
> Cheers,
>
> Richard
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH V4] procps: support ptest when TCLIBC is glibc
2026-01-28 11:32 ` [OE-core] " Richard Purdie
2026-01-29 7:39 ` Changqing Li
@ 2026-01-29 7:48 ` changqing.li
[not found] ` <188F2427284C7A56.4057262@lists.openembedded.org>
2 siblings, 0 replies; 10+ messages in thread
From: changqing.li @ 2026-01-29 7:48 UTC (permalink / raw)
To: openembedded-core
From: Changqing Li <changqing.li@windriver.com>
* support ptest for procps TCLIBC is glibc. The configure.ac only match
LINUX as "linux-gnu", we can patch it to make test can run on musl lib
system, but the upstream testsuite should only run on gnu libc host,
some test cases only suitable for glibc, eg: Some of the error messages
for free command on musl system is not the same as glibc system, which
will make test failed. In order to avoid some other unexpected failure,
just support ptest for glibc.
* procps's testsuite use DejaGnu test framework. The testsuite is
expected to run during build time, this implementation create the same
folder structure as the testsuite expected to make it can work well.
* Two pmap test cases may randomly run failed, so set it as xfail, and
open a issue upstream
[1] https://gitlab.com/procps-ng/procps/-/issues/409
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
.../distro/include/ptest-packagelists.inc | 2 +
meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
meta/recipes-extended/procps/procps_4.0.5.bb | 60 ++++++++++++++++++-
3 files changed, 84 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/procps/procps/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index fff2947177..2391224527 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -57,6 +57,7 @@ PTESTS_FAST = "\
nettle \
opkg \
popt \
+ procps \
python3-atomicwrites \
python3-attrs \
python3-bcrypt \
@@ -97,6 +98,7 @@ PTESTS_FAST:remove:mips64 = "qemu"
PTESTS_PROBLEMS:append:mips64 = " qemu"
PTESTS_FAST:remove:riscv32 = "qemu"
PTESTS_PROBLEMS:append:riscv32 = " qemu"
+PTESTS_FAST:remove:libc-musl = "procps"
PTESTS_SLOW = "\
apr \
diff --git a/meta/recipes-extended/procps/procps/run-ptest b/meta/recipes-extended/procps/procps/run-ptest
new file mode 100644
index 0000000000..7e132653b0
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/run-ptest
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Run testsuite which use dejagnu
+cd ./testsuite
+for tool in @DEJATOOL@; do
+ runtest -a --tool $tool --outdir ../log
+done
+cd -
+
+# Run test programs not used by dejagnu but run directly
+for p in @TESTS@; do
+ ./src/tests/"$p" > ./log/"$p".log 2>&1
+ case "$?" in
+ 0)
+ echo "PASS: $p"
+ ;;
+ 77)
+ echo "SKIP: $p"
+ ;;
+ *)
+ echo "FAIL: $p"
+ ;;
+ esac
+done
diff --git a/meta/recipes-extended/procps/procps_4.0.5.bb b/meta/recipes-extended/procps/procps_4.0.5.bb
index 0e0e06f0d2..bccfee1de9 100644
--- a/meta/recipes-extended/procps/procps_4.0.5.bb
+++ b/meta/recipes-extended/procps/procps_4.0.5.bb
@@ -10,11 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
DEPENDS = "ncurses"
-inherit autotools gettext pkgconfig update-alternatives
+inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master;tag=v${PV} \
file://sysctl.conf \
file://top_large_pid_fix.patch \
+ file://run-ptest \
"
SRCREV = "f46b2f7929cdfe2913ed0a7f585b09d6adbf994e"
@@ -47,8 +48,61 @@ do_install:append () {
fi
}
-CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
+do_compile_ptest() {
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS); do
+ oe_runmake $p
+ done
+ oe_runmake -C testsuite site.exp
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite
+ install -d ${D}${PTEST_PATH}/src/tests
+ install -d ${D}${PTEST_PATH}/log
+
+ install -m644 ${B}/testsuite/site.exp ${D}${PTEST_PATH}/testsuite/
+ for p in $(makefile-getvar ${B}/testsuite/Makefile noinst_PROGRAMS); do
+ install -m755 ${B}/testsuite/$p ${D}${PTEST_PATH}/testsuite/
+ done
+ cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS);do
+ case "$p" in
+ src/tests/*)
+ install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/ ;;
+ library/tests/*)
+ install -m 0755 ${B}/library/tests/.libs/$(basename $p) ${D}${PTEST_PATH}/src/tests/ ;;
+ esac
+ done
+
+ tests=""
+ for p in $(makefile-getvar ${B}/Makefile TESTS); do
+ tests="$tests $(basename $p)"
+ done
+ sed -i -e "s#@TESTS@#$tests#" ${D}${PTEST_PATH}/run-ptest
+
+ sed -i -e "/set srcdir/c\set srcdir ${PTEST_PATH}/testsuite" \
+ -e "/set objdir/c\set objdir ${PTEST_PATH}/testsuite" ${D}${PTEST_PATH}/testsuite/site.exp
+
+ sed -i -e "s#@DEJATOOL@#$(makefile-getvar ${B}/testsuite/Makefile DEJATOOL)#" ${D}${PTEST_PATH}/run-ptest
+ for p in $(makefile-getvar ${B}/testsuite/Makefile DEJATOOL); do
+ if [ "$p" = "ps" ]; then
+ install -d ${D}${PTEST_PATH}/src/ps
+ ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
+ elif [ "$p" = "sysctl" ]; then
+ ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
+ elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
+ ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
+ else
+ ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
+ fi
+ done
+ sed -i -e '/set test "pmap X pid pid has same total"/a \setup_xfail *-*-linux*' \
+ -e '/set test "pmap XX pid pid has same total"/a \setup_xfail *-*-linux*' ${D}${PTEST_PATH}/testsuite/pmap.test/pmap.exp
+}
+
+CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
base_bindir_progs += "kill pidof ps watch"
base_sbindir_progs += "sysctl"
@@ -80,6 +134,8 @@ RDEPENDS:${PN} += "${PROCPS_PACKAGES}"
RDEPENDS:${PN}-ps += "${PN}-lib"
RDEPENDS:${PN}-sysctl += "${PN}-lib"
+RDEPENDS:${PN}-ptest += "dejagnu glibc-utils"
+
FILES:${PN}-lib = "${libdir}"
FILES:${PN}-ps = "${base_bindir}/ps.${BPN}"
FILES:${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d"
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread[parent not found: <188F2427284C7A56.4057262@lists.openembedded.org>]
* Re: [OE-core] [PATCH V4] procps: support ptest when TCLIBC is glibc
[not found] ` <188F2427284C7A56.4057262@lists.openembedded.org>
@ 2026-02-09 1:58 ` Changqing Li
0 siblings, 0 replies; 10+ messages in thread
From: Changqing Li @ 2026-02-09 1:58 UTC (permalink / raw)
To: openembedded-core
Ping
Regard
//Changqing
On 1/29/26 15:48, Changqing Li via lists.openembedded.org wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> * support ptest for procps TCLIBC is glibc. The configure.ac only match
> LINUX as "linux-gnu", we can patch it to make test can run on musl lib
> system, but the upstream testsuite should only run on gnu libc host,
> some test cases only suitable for glibc, eg: Some of the error messages
> for free command on musl system is not the same as glibc system, which
> will make test failed. In order to avoid some other unexpected failure,
> just support ptest for glibc.
>
> * procps's testsuite use DejaGnu test framework. The testsuite is
> expected to run during build time, this implementation create the same
> folder structure as the testsuite expected to make it can work well.
>
> * Two pmap test cases may randomly run failed, so set it as xfail, and
> open a issue upstream
>
> [1] https://gitlab.com/procps-ng/procps/-/issues/409
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
> .../distro/include/ptest-packagelists.inc | 2 +
> meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
> meta/recipes-extended/procps/procps_4.0.5.bb | 60 ++++++++++++++++++-
> 3 files changed, 84 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-extended/procps/procps/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index fff2947177..2391224527 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -57,6 +57,7 @@ PTESTS_FAST = "\
> nettle \
> opkg \
> popt \
> + procps \
> python3-atomicwrites \
> python3-attrs \
> python3-bcrypt \
> @@ -97,6 +98,7 @@ PTESTS_FAST:remove:mips64 = "qemu"
> PTESTS_PROBLEMS:append:mips64 = " qemu"
> PTESTS_FAST:remove:riscv32 = "qemu"
> PTESTS_PROBLEMS:append:riscv32 = " qemu"
> +PTESTS_FAST:remove:libc-musl = "procps"
>
> PTESTS_SLOW = "\
> apr \
> diff --git a/meta/recipes-extended/procps/procps/run-ptest b/meta/recipes-extended/procps/procps/run-ptest
> new file mode 100644
> index 0000000000..7e132653b0
> --- /dev/null
> +++ b/meta/recipes-extended/procps/procps/run-ptest
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +
> +# Run testsuite which use dejagnu
> +cd ./testsuite
> +for tool in @DEJATOOL@; do
> + runtest -a --tool $tool --outdir ../log
> +done
> +cd -
> +
> +# Run test programs not used by dejagnu but run directly
> +for p in @TESTS@; do
> + ./src/tests/"$p" > ./log/"$p".log 2>&1
> + case "$?" in
> + 0)
> + echo "PASS: $p"
> + ;;
> + 77)
> + echo "SKIP: $p"
> + ;;
> + *)
> + echo "FAIL: $p"
> + ;;
> + esac
> +done
> diff --git a/meta/recipes-extended/procps/procps_4.0.5.bb b/meta/recipes-extended/procps/procps_4.0.5.bb
> index 0e0e06f0d2..bccfee1de9 100644
> --- a/meta/recipes-extended/procps/procps_4.0.5.bb
> +++ b/meta/recipes-extended/procps/procps_4.0.5.bb
> @@ -10,11 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
>
> DEPENDS = "ncurses"
>
> -inherit autotools gettext pkgconfig update-alternatives
> +inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
>
> SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master;tag=v${PV} \
> file://sysctl.conf \
> file://top_large_pid_fix.patch \
> + file://run-ptest \
> "
> SRCREV = "f46b2f7929cdfe2913ed0a7f585b09d6adbf994e"
>
> @@ -47,8 +48,61 @@ do_install:append () {
> fi
> }
>
> -CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
> +do_compile_ptest() {
> + for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS); do
> + oe_runmake $p
> + done
> + oe_runmake -C testsuite site.exp
> +}
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/testsuite
> + install -d ${D}${PTEST_PATH}/src/tests
> + install -d ${D}${PTEST_PATH}/log
> +
> + install -m644 ${B}/testsuite/site.exp ${D}${PTEST_PATH}/testsuite/
> + for p in $(makefile-getvar ${B}/testsuite/Makefile noinst_PROGRAMS); do
> + install -m755 ${B}/testsuite/$p ${D}${PTEST_PATH}/testsuite/
> + done
> + cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
> +
> + for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS);do
> + case "$p" in
> + src/tests/*)
> + install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/ ;;
> + library/tests/*)
> + install -m 0755 ${B}/library/tests/.libs/$(basename $p) ${D}${PTEST_PATH}/src/tests/ ;;
> + esac
> + done
> +
> + tests=""
> + for p in $(makefile-getvar ${B}/Makefile TESTS); do
> + tests="$tests $(basename $p)"
> + done
> + sed -i -e "s#@TESTS@#$tests#" ${D}${PTEST_PATH}/run-ptest
> +
> + sed -i -e "/set srcdir/c\set srcdir ${PTEST_PATH}/testsuite" \
> + -e "/set objdir/c\set objdir ${PTEST_PATH}/testsuite" ${D}${PTEST_PATH}/testsuite/site.exp
> +
> + sed -i -e "s#@DEJATOOL@#$(makefile-getvar ${B}/testsuite/Makefile DEJATOOL)#" ${D}${PTEST_PATH}/run-ptest
> + for p in $(makefile-getvar ${B}/testsuite/Makefile DEJATOOL); do
> + if [ "$p" = "ps" ]; then
> + install -d ${D}${PTEST_PATH}/src/ps
> + ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
> + elif [ "$p" = "sysctl" ]; then
> + ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
> + elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
> + ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
> + else
> + ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
> + fi
> + done
>
> + sed -i -e '/set test "pmap X pid pid has same total"/a \setup_xfail *-*-linux*' \
> + -e '/set test "pmap XX pid pid has same total"/a \setup_xfail *-*-linux*' ${D}${PTEST_PATH}/testsuite/pmap.test/pmap.exp
> +}
> +
> +CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
> bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
> base_bindir_progs += "kill pidof ps watch"
> base_sbindir_progs += "sysctl"
> @@ -80,6 +134,8 @@ RDEPENDS:${PN} += "${PROCPS_PACKAGES}"
> RDEPENDS:${PN}-ps += "${PN}-lib"
> RDEPENDS:${PN}-sysctl += "${PN}-lib"
>
> +RDEPENDS:${PN}-ptest += "dejagnu glibc-utils"
> +
> FILES:${PN}-lib = "${libdir}"
> FILES:${PN}-ps = "${base_bindir}/ps.${BPN}"
> FILES:${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#230122): https://lists.openembedded.org/g/openembedded-core/message/230122
> Mute This Topic: https://lists.openembedded.org/mt/117523139/3616873
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [changqing.li@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <188E8AC794A362CA.3302988@lists.openembedded.org>]
* Re: [OE-core] [PATCH V3] procps: support ptest when TCLIBC is glibc
[not found] ` <188E8AC794A362CA.3302988@lists.openembedded.org>
@ 2026-01-27 9:06 ` Changqing Li
0 siblings, 0 replies; 10+ messages in thread
From: Changqing Li @ 2026-01-27 9:06 UTC (permalink / raw)
To: openembedded-core, Ross Burton; +Cc: antonin.godard, Richard Purdie
CC antonin and Richard to remind there is a V3, because V2 is on
master-next.
//Changqing
On 1/27/26 16:58, Changqing Li via lists.openembedded.org wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> * support ptest for procps TCLIBC is glibc. The configure.ac only match
> LINUX as "linux-gnu", we can patch it to make test can run on musl lib
> system, but the upstream testsuite should only run on gnu libc host,
> some test cases only suitable for glibc, eg: Some of the error messages
> for free command on musl system is not the same as glibc system, which
> will make test failed. In order to avoid some other unexpected failure,
> just support ptest for glibc.
>
> * procps's testsuite use DejaGnu test framework. The testsuite is
> expected to run during build time, this implementation create the same
> folder structure as the testsuite expected to make it can work well.
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
> .../distro/include/ptest-packagelists.inc | 2 +
> meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
> meta/recipes-extended/procps/procps_4.0.5.bb | 57 ++++++++++++++++++-
> 3 files changed, 81 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-extended/procps/procps/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index fff2947177..2391224527 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -57,6 +57,7 @@ PTESTS_FAST = "\
> nettle \
> opkg \
> popt \
> + procps \
> python3-atomicwrites \
> python3-attrs \
> python3-bcrypt \
> @@ -97,6 +98,7 @@ PTESTS_FAST:remove:mips64 = "qemu"
> PTESTS_PROBLEMS:append:mips64 = " qemu"
> PTESTS_FAST:remove:riscv32 = "qemu"
> PTESTS_PROBLEMS:append:riscv32 = " qemu"
> +PTESTS_FAST:remove:libc-musl = "procps"
>
> PTESTS_SLOW = "\
> apr \
> diff --git a/meta/recipes-extended/procps/procps/run-ptest b/meta/recipes-extended/procps/procps/run-ptest
> new file mode 100644
> index 0000000000..7e132653b0
> --- /dev/null
> +++ b/meta/recipes-extended/procps/procps/run-ptest
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +
> +# Run testsuite which use dejagnu
> +cd ./testsuite
> +for tool in @DEJATOOL@; do
> + runtest -a --tool $tool --outdir ../log
> +done
> +cd -
> +
> +# Run test programs not used by dejagnu but run directly
> +for p in @TESTS@; do
> + ./src/tests/"$p" > ./log/"$p".log 2>&1
> + case "$?" in
> + 0)
> + echo "PASS: $p"
> + ;;
> + 77)
> + echo "SKIP: $p"
> + ;;
> + *)
> + echo "FAIL: $p"
> + ;;
> + esac
> +done
> diff --git a/meta/recipes-extended/procps/procps_4.0.5.bb b/meta/recipes-extended/procps/procps_4.0.5.bb
> index 0e0e06f0d2..cddb79cf10 100644
> --- a/meta/recipes-extended/procps/procps_4.0.5.bb
> +++ b/meta/recipes-extended/procps/procps_4.0.5.bb
> @@ -10,11 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
>
> DEPENDS = "ncurses"
>
> -inherit autotools gettext pkgconfig update-alternatives
> +inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
>
> SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master;tag=v${PV} \
> file://sysctl.conf \
> file://top_large_pid_fix.patch \
> + file://run-ptest \
> "
> SRCREV = "f46b2f7929cdfe2913ed0a7f585b09d6adbf994e"
>
> @@ -47,8 +48,58 @@ do_install:append () {
> fi
> }
>
> -CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
> +do_compile_ptest() {
> + for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS); do
> + oe_runmake $p
> + done
> + oe_runmake -C testsuite site.exp
> +}
>
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/testsuite
> + install -d ${D}${PTEST_PATH}/src/tests
> + install -d ${D}${PTEST_PATH}/log
> +
> + install -m644 ${B}/testsuite/site.exp ${D}${PTEST_PATH}/testsuite/
> + for p in $(makefile-getvar ${B}/testsuite/Makefile noinst_PROGRAMS); do
> + install -m755 ${B}/testsuite/$p ${D}${PTEST_PATH}/testsuite/
> + done
> + cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
> +
> + for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS);do
> + case "$p" in
> + src/tests/*)
> + install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/ ;;
> + library/tests/*)
> + install -m 0755 ${B}/library/tests/.libs/$(basename $p) ${D}${PTEST_PATH}/src/tests/ ;;
> + esac
> + done
> +
> + tests=""
> + for p in $(makefile-getvar ${B}/Makefile TESTS); do
> + tests="$tests $(basename $p)"
> + done
> + sed -i -e "s#@TESTS@#$tests#" ${D}${PTEST_PATH}/run-ptest
> +
> + sed -i -e "/set srcdir/c\set srcdir ${PTEST_PATH}/testsuite" \
> + -e "/set objdir/c\set objdir ${PTEST_PATH}/testsuite" ${D}${PTEST_PATH}/testsuite/site.exp
> +
> + sed -i -e "s#@DEJATOOL@#$(makefile-getvar ${B}/testsuite/Makefile DEJATOOL)#" ${D}${PTEST_PATH}/run-ptest
> + for p in $(makefile-getvar ${B}/testsuite/Makefile DEJATOOL); do
> + if [ "$p" = "ps" ]; then
> + install -d ${D}${PTEST_PATH}/src/ps
> + ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
> + elif [ "$p" = "sysctl" ]; then
> + ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
> + elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
> + ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
> + else
> + ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
> + fi
> + done
> +}
> +
> +CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
> bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
> base_bindir_progs += "kill pidof ps watch"
> base_sbindir_progs += "sysctl"
> @@ -80,6 +131,8 @@ RDEPENDS:${PN} += "${PROCPS_PACKAGES}"
> RDEPENDS:${PN}-ps += "${PN}-lib"
> RDEPENDS:${PN}-sysctl += "${PN}-lib"
>
> +RDEPENDS:${PN}-ptest += "dejagnu glibc-utils"
> +
> FILES:${PN}-lib = "${libdir}"
> FILES:${PN}-ps = "${base_bindir}/ps.${BPN}"
> FILES:${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#230032): https://lists.openembedded.org/g/openembedded-core/message/230032
> Mute This Topic: https://lists.openembedded.org/mt/117485471/3616873
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [changqing.li@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/2] procps: support ptest when TCLIBC is glibc
@ 2026-02-26 13:13 Ross Burton
2026-02-27 6:49 ` [PATCH V2] " Changqing Li
0 siblings, 1 reply; 10+ messages in thread
From: Ross Burton @ 2026-02-26 13:13 UTC (permalink / raw)
To: changqing.li@windriver.com; +Cc: openembedded-core@lists.openembedded.org
Hi,
On 24 Feb 2026, at 01:47, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
>
> * support ptest for procps TCLIBC is glibc. The configure.ac only match
> LINUX as "linux-gnu", we can patch it to make test can run on musl lib
> system, but the upstream testsuite should only run on gnu libc host,
> some test cases only suitable for glibc, eg: Some of the error messages
> for free command on musl system is not the same as glibc system, which
> will make test failed. In order to avoid some other unexpected failure,
> just support ptest for glibc.
>
> * procps's testsuite use DejaGnu test framework. The testsuite is
> expected to run during build time, this implementation create the same
> folder structure as the testsuite expected to make it can work well.
I filed a bug for musl support just now, https://gitlab.com/procps-ng/procps/-/issues/420. Please link to this in your changes.
I think we should build the tests for everything, and skip the few tests which break. In my testing in an alpine container there are five failing tests, but it seems that two of them are busybox related so we can resolve that with dependencies to pull in the proper tools.
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH V2] procps: support ptest when TCLIBC is glibc
2026-02-26 13:13 [OE-core] [PATCH 2/2] " Ross Burton
@ 2026-02-27 6:49 ` Changqing Li
2026-03-05 15:16 ` [OE-core] " Ross Burton
0 siblings, 1 reply; 10+ messages in thread
From: Changqing Li @ 2026-02-27 6:49 UTC (permalink / raw)
To: openembedded-core
* Support ptest for procps TCLIBC is glibc. The configure.ac only match
LINUX as "linux-gnu", we can patch it to make test can run on musl lib
system, but the upstream testsuite should only run on gnu libc host,
some test cases only suitable for glibc, eg: Some of the error messages
for free command on musl system is not the same as glibc system, which
will make test failed. In order to avoid some other unexpected failure,
just support ptest for glibc.
* Bug [1] is filed for musl support, we may can add support for musl
libc later when upstream add the musl support
* procps's testsuite use DejaGnu test framework. The testsuite is
expected to run during build time, this implementation create the same
folder structure as the testsuite expected to make it can work well.
[1] https://gitlab.com/procps-ng/procps/-/issues/420
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
.../distro/include/ptest-packagelists.inc | 2 +
...sts-Disable-twice-total-pmap-X-tests.patch | 55 ++++++++++++++++++
meta/recipes-extended/procps/procps/run-ptest | 24 ++++++++
meta/recipes-extended/procps/procps_4.0.6.bb | 57 ++++++++++++++++++-
4 files changed, 137 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/procps/procps/0001-tests-Disable-twice-total-pmap-X-tests.patch
create mode 100644 meta/recipes-extended/procps/procps/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index b9616e9bf4..8099ff3cea 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -59,6 +59,7 @@ PTESTS_FAST = "\
nettle \
opkg \
popt \
+ procps \
python3-atomicwrites \
python3-attrs \
python3-bcrypt \
@@ -99,6 +100,7 @@ PTESTS_FAST:remove:mips64 = "qemu"
PTESTS_PROBLEMS:append:mips64 = " qemu"
PTESTS_FAST:remove:riscv32 = "qemu"
PTESTS_PROBLEMS:append:riscv32 = " qemu"
+PTESTS_FAST:remove:libc-musl = "procps"
PTESTS_SLOW = "\
apr \
diff --git a/meta/recipes-extended/procps/procps/0001-tests-Disable-twice-total-pmap-X-tests.patch b/meta/recipes-extended/procps/procps/0001-tests-Disable-twice-total-pmap-X-tests.patch
new file mode 100644
index 0000000000..ec26af92fe
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/0001-tests-Disable-twice-total-pmap-X-tests.patch
@@ -0,0 +1,55 @@
+From 56505e2ac9b703aac979f0849814ab7c83af57e2 Mon Sep 17 00:00:00 2001
+From: Craig Small <csmall@dropbear.xyz>
+Date: Mon, 9 Feb 2026 18:19:35 +1100
+Subject: [PATCH] tests: Disable twice total pmap -X tests
+
+Sometimes the memory count can be just a little different
+but the test is equal, i.e. must be the exact number.
+This means sometimes the test fails.
+
+This removes the pmap -XX pid pid and pmap -X pid pid tests
+for checking the result is the same.
+
+Debian buildds this test never works and has been removed
+for a while.
+
+References:
+ #409
+
+Signed-off-by: Craig Small <csmall@dropbear.xyz>
+
+Upstream-Status: Backport [https://gitlab.com/procps-ng/procps/-/commit/bbe21e141b77398586c90884a43ff75996b83843]
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ testsuite/pmap.test/pmap.exp | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/testsuite/pmap.test/pmap.exp b/testsuite/pmap.test/pmap.exp
+index d37b55e5..6fb6fa1e 100644
+--- a/testsuite/pmap.test/pmap.exp
++++ b/testsuite/pmap.test/pmap.exp
+@@ -93,13 +93,14 @@ proc expect_twice_total { test } {
+ }
+ }
+
+-set test "pmap X pid pid has same total"
+-spawn $pmap -X $mypid $mypid
+-expect_twice_total "$test"
+-
+-set test "pmap XX pid pid has same total"
+-spawn $pmap -XX $mypid $mypid
+-expect_twice_total "$test"
++# Disabled twice total as there can be a small change issue #409
++#set test "pmap X pid pid has same total"
++#spawn $pmap -X $mypid $mypid
++#expect_twice_total "$test"
++
++#set test "pmap XX pid pid has same total"
++#spawn $pmap -XX $mypid $mypid
++#expect_twice_total "$test"
+
+ set test "pmap finding shm"
+ make_testshm_proc
+--
+2.34.1
+
diff --git a/meta/recipes-extended/procps/procps/run-ptest b/meta/recipes-extended/procps/procps/run-ptest
new file mode 100644
index 0000000000..7e132653b0
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/run-ptest
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Run testsuite which use dejagnu
+cd ./testsuite
+for tool in @DEJATOOL@; do
+ runtest -a --tool $tool --outdir ../log
+done
+cd -
+
+# Run test programs not used by dejagnu but run directly
+for p in @TESTS@; do
+ ./src/tests/"$p" > ./log/"$p".log 2>&1
+ case "$?" in
+ 0)
+ echo "PASS: $p"
+ ;;
+ 77)
+ echo "SKIP: $p"
+ ;;
+ *)
+ echo "FAIL: $p"
+ ;;
+ esac
+done
diff --git a/meta/recipes-extended/procps/procps_4.0.6.bb b/meta/recipes-extended/procps/procps_4.0.6.bb
index 168027077b..21da72039a 100644
--- a/meta/recipes-extended/procps/procps_4.0.6.bb
+++ b/meta/recipes-extended/procps/procps_4.0.6.bb
@@ -10,10 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
DEPENDS = "ncurses"
-inherit autotools gettext pkgconfig update-alternatives
+inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master;tag=v${PV} \
file://sysctl.conf \
+ file://0001-tests-Disable-twice-total-pmap-X-tests.patch \
+ file://run-ptest \
"
SRCREV = "4dafddf4c3f4646caa517f039a2307e92657ec93"
@@ -46,6 +48,58 @@ do_install:append () {
fi
}
+do_compile_ptest() {
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS); do
+ oe_runmake $p
+ done
+ oe_runmake -C testsuite site.exp
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite
+ install -d ${D}${PTEST_PATH}/src/tests
+ install -d ${D}${PTEST_PATH}/log
+
+ install -m644 ${B}/testsuite/site.exp ${D}${PTEST_PATH}/testsuite/
+ for p in $(makefile-getvar ${B}/testsuite/Makefile noinst_PROGRAMS); do
+ install -m755 ${B}/testsuite/$p ${D}${PTEST_PATH}/testsuite/
+ done
+ cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS);do
+ case "$p" in
+ src/tests/*)
+ install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/ ;;
+ library/tests/*)
+ install -m 0755 ${B}/library/tests/.libs/$(basename $p) ${D}${PTEST_PATH}/src/tests/ ;;
+ esac
+ done
+
+ tests=""
+ for p in $(makefile-getvar ${B}/Makefile TESTS); do
+ tests="$tests $(basename $p)"
+ done
+ sed -i -e "s#@TESTS@#$tests#" ${D}${PTEST_PATH}/run-ptest
+
+ sed -i -e "/set srcdir/c\set srcdir ${PTEST_PATH}/testsuite" \
+ -e "/set objdir/c\set objdir ${PTEST_PATH}/testsuite" ${D}${PTEST_PATH}/testsuite/site.exp
+
+ sed -i -e "s#@DEJATOOL@#$(makefile-getvar ${B}/testsuite/Makefile DEJATOOL)#" ${D}${PTEST_PATH}/run-ptest
+ for p in $(makefile-getvar ${B}/testsuite/Makefile DEJATOOL); do
+ if [ "$p" = "ps" ]; then
+ install -d ${D}${PTEST_PATH}/src/ps
+ ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
+ elif [ "$p" = "sysctl" ]; then
+ ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
+ elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ]; then
+ ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
+ else
+ ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
+ fi
+ done
+}
+
+
CONFFILES:${PN} = "${sysconfdir}/sysctl.conf"
bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
@@ -78,6 +132,7 @@ RDEPENDS:${PN} += "${PROCPS_PACKAGES}"
RDEPENDS:${PN}-ps += "${PN}-lib"
RDEPENDS:${PN}-sysctl += "${PN}-lib"
+RDEPENDS:${PN}-ptest += "dejagnu glibc-utils"
FILES:${PN}-lib = "${libdir}"
FILES:${PN}-ps = "${base_bindir}/ps.${BPN}"
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [OE-core] [PATCH V2] procps: support ptest when TCLIBC is glibc
2026-02-27 6:49 ` [PATCH V2] " Changqing Li
@ 2026-03-05 15:16 ` Ross Burton
0 siblings, 0 replies; 10+ messages in thread
From: Ross Burton @ 2026-03-05 15:16 UTC (permalink / raw)
To: changqing.li@windriver.com; +Cc: openembedded-core@lists.openembedded.org
On 27 Feb 2026, at 06:49, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
> -inherit autotools gettext pkgconfig update-alternatives
> +inherit autotools gettext pkgconfig update-alternatives ${@bb.utils.contains('TCLIBC', 'glibc', 'ptest', '', d)}
To match the logic in the ptest image where the test is “disable if musl” not “enable if glibc”, you could always inherit ptest and then simply do PTEST_ENABLED:libc-musl = “0”
> + src/tests/*)
> + install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/ ;;
> + library/tests/*)
> + install -m 0755 ${B}/library/tests/.libs/$(basename $p) ${D}${PTEST_PATH}/src/tests/ ;;
If libtool build a binary then please always use libtool to install it. You might be able to remove the conditional here and just always do:
${B}/libtool —mode=install install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/tests/
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-03-05 15:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 9:27 [PATCH V2] procps: support ptest when TCLIBC is glibc changqing.li
2026-01-26 13:01 ` [OE-core] " Ross Burton
2026-01-27 8:57 ` Changqing Li
2026-01-27 8:58 ` [PATCH V3] " changqing.li
2026-01-28 11:32 ` [OE-core] " Richard Purdie
2026-01-29 7:39 ` Changqing Li
2026-01-29 7:48 ` [PATCH V4] " changqing.li
[not found] ` <188F2427284C7A56.4057262@lists.openembedded.org>
2026-02-09 1:58 ` [OE-core] " Changqing Li
[not found] ` <188E8AC794A362CA.3302988@lists.openembedded.org>
2026-01-27 9:06 ` [OE-core] [PATCH V3] " Changqing Li
-- strict thread matches above, loose matches on Subject: below --
2026-02-26 13:13 [OE-core] [PATCH 2/2] " Ross Burton
2026-02-27 6:49 ` [PATCH V2] " Changqing Li
2026-03-05 15:16 ` [OE-core] " Ross Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox