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

Ross Burton
2026-01-26T13:02:16Z

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