From: Pratik Farkase <pratik.farkase@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com, Pratik Farkase <pratik.farkase@est.tech>
Subject: [OE-core][PATCH v1] psmisc: add ptest support
Date: Mon, 14 Sep 2026 15:04:46 +0200 [thread overview]
Message-ID: <20260914130447.107189-1-pratik.farkase@est.tech> (raw)
Add ptest support using psmisc's upstream DejaGnu testsuite, which
exercises killall, pslog and fuser via their .exp scripts. The tools and
the testsuite helper programs (socket_test, test-listen) are installed
under a src/ layout so the scripts' ${topdir}src/<tool> paths resolve on
target.
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../distro/include/ptest-packagelists.inc | 1 +
meta/recipes-extended/psmisc/psmisc/run-ptest | 7 +++
meta/recipes-extended/psmisc/psmisc_23.7.bb | 45 ++++++++++++++++++-
3 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/psmisc/psmisc/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 4012be5f49..f01abc4a57 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -68,6 +68,7 @@ PTESTS_FAST = "\
opkg \
popt \
procps \
+ psmisc \
python3-atomicwrites \
python3-attrs \
python3-bcrypt \
diff --git a/meta/recipes-extended/psmisc/psmisc/run-ptest b/meta/recipes-extended/psmisc/psmisc/run-ptest
new file mode 100644
index 0000000000..f4e79f5ae3
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cd ./testsuite
+for tool in @DEJATOOL@; do
+ runtest -a --tool $tool --outdir ../log
+done
+cd -
diff --git a/meta/recipes-extended/psmisc/psmisc_23.7.bb b/meta/recipes-extended/psmisc/psmisc_23.7.bb
index ad57c49ffe..3c768f4a86 100644
--- a/meta/recipes-extended/psmisc/psmisc_23.7.bb
+++ b/meta/recipes-extended/psmisc/psmisc_23.7.bb
@@ -13,10 +13,11 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https;branch=master;tag=v${PV} \
+ file://run-ptest \
"
SRCREV = "9091d6dbcce3d8fb87adf9249a2eb346d25a562c"
-inherit autotools gettext
+inherit autotools gettext ptest
# Upstream has a custom autogen.sh which invokes po/update-potfiles as they
# don't ship a po/POTFILES.in (which is silly). Without that file gettext
@@ -25,6 +26,48 @@ do_configure:prepend() {
( cd ${S} && po/update-potfiles )
}
+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
+ install -d ${D}${PTEST_PATH}/log
+
+ cp -r ${S}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+ install -m 0644 ${B}/testsuite/site.exp ${D}${PTEST_PATH}/testsuite/
+
+ # Tools exercised by the .exp scripts.
+ for p in killall pslog prtstat fuser; do
+ if [ -x ${B}/src/$p ]; then
+ install -m 0755 ${B}/src/$p ${D}${PTEST_PATH}/src/
+ fi
+ done
+
+ # Helper programs (check_PROGRAMS) used by the fuser tests.
+ for p in $(makefile-getvar ${B}/Makefile check_PROGRAMS); do
+ install -m 0755 ${B}/$p ${D}${PTEST_PATH}/src/
+ done
+
+ sed -i -e "s#@DEJATOOL@#$(makefile-getvar ${B}/testsuite/Makefile DEJATOOL)#" \
+ ${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
+}
+
+do_install_ptest_base:append() {
+ sed -i -e 's/^set \([a-zA-Z_]*\)$/set \1 ""/' \
+ ${D}${PTEST_PATH}/testsuite/site.exp
+}
+
+RDEPENDS:${PN}-ptest += "dejagnu"
+
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
--
2.43.0
next reply other threads:[~2026-09-14 13:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 13:04 Pratik Farkase [this message]
2026-09-15 13:22 ` [OE-core][PATCH v1] psmisc: add ptest support Antonin Godard
2026-09-16 8:16 ` [OE-core][PATCH v2] " Pratik Farkase
2026-09-16 8:31 ` Patchtest results for " patchtest
2026-09-16 9:15 ` Pratik Farkase
2026-09-21 7:36 ` Antonin Godard
2026-09-18 9:36 ` Pratik Farkase
2026-09-21 12:31 ` [OE-core][PATCH v3] " Pratik Farkase
2026-09-21 12:46 ` Patchtest results for " patchtest
2026-09-21 12:57 ` Pratik Farkase
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260914130447.107189-1-pratik.farkase@est.tech \
--to=pratik.farkase@est.tech \
--cc=openembedded-core@lists.openembedded.org \
--cc=pratik.farkase@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox