public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ross Burton <Ross.Burton@arm.com>
To: "changqing.li@windriver.com" <changqing.li@windriver.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH V2] procps: support ptest when TCLIBC is glibc
Date: Mon, 26 Jan 2026 13:01:01 +0000	[thread overview]
Message-ID: <48503D06-1C65-407A-8EE8-B2E5099C797C@arm.com> (raw)
In-Reply-To: <20260116092704.2465341-1-changqing.li@windriver.com>

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

  reply	other threads:[~2026-01-26 13:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16  9:27 [PATCH V2] procps: support ptest when TCLIBC is glibc changqing.li
2026-01-26 13:01 ` Ross Burton [this message]
2026-01-27  8:57   ` [OE-core] " 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

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=48503D06-1C65-407A-8EE8-B2E5099C797C@arm.com \
    --to=ross.burton@arm.com \
    --cc=changqing.li@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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