Re: [PATCH 3/3] perf test: fix "trace summary" test for musl-based systems

Namhyung Kim <[email protected]>
Newsgroups dev.linux.lists.sashiko,org.kernel.vger.linux-perf-users
Message-ID <[email protected]>
On Mon, Apr 27, 2026 at 09:57:44AM +0000, [email protected] wrote:
> Sashiko AI review found 1 potential issue(s):
> - [Medium] The `ps --help` test workload is brittle and will continue to fail on many musl-based systems that use BusyBox.
> --
> 
> commit 41e18297314ee059526c7fb6d14d02d61ba92d64
> Author: Martin Kaiser <[email protected]>
> 
> perf test: fix "trace summary" test for musl-based systems
> 
> This commit updates the trace summary test to use ps --help instead
> of true. The goal is to ensure the test workload triggers open, read,
> and close events from dynamic library loading on musl-based systems.
> 
> > diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh
> > --- a/tools/perf/tests/shell/trace_summary.sh
> > +++ b/tools/perf/tests/shell/trace_summary.sh
> > @@ -14,7 +14,7 @@ OUTPUT=$(mktemp /tmp/perf_trace_test.XXXXX)
> >  
> >  test_perf_trace() {
> >      args=$1
> > -    workload="true"
> > +    workload="ps --help"
> 
> Will this workload still fail on musl-based systems that use BusyBox?
> 
> Many musl-based distributions, such as Alpine Linux or OpenWrt, frequently
> use BusyBox to provide standard utilities. BusyBox's ps is typically
> statically linked or links only to libc, without depending on libprocps.
> 
> Furthermore, running ps --help in BusyBox generally prints the usage string
> and exits without performing file I/O, which means no open, read, or close
> events will be generated.
> 
> Would a command that natively performs file I/O, such as cat /dev/null or
> dd if=/dev/null of=/dev/null, be more robust here?

Sounds right, it'd be nice if the workload doesn't print anything like
above.

Thanks,
Namhyung

> 
> >      search="^\s*(open|read|close).*[0-9]+%$"
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.