Re: [OE-core] [PATCH V2] procps: support ptest when TCLIBC is glibc

Changqing Li
2026-01-27T08:57:47Z

[-- 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 --]