From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 3/4] perf test: Do not skip when some metrics tests succeeded
Date: Fri, 9 Jan 2026 16:26:46 -0800 [thread overview]
Message-ID: <aWGcxpQXZZH5znwq@google.com> (raw)
In-Reply-To: <CAP-5=fVDYu+GLspYQNEHk7_X8-FE-OaEF0OaG+vfWrrYH9ZcoQ@mail.gmail.com>
Hi Ian,
On Fri, Jan 09, 2026 at 03:37:01PM -0800, Ian Rogers wrote:
> On Thu, Dec 18, 2025 at 5:18 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > I think the return value of SKIP (2) should be used when it skipped the
> > entire test suite rather than a few of them. While the FAIL should be
> > reserved if any of test failed.
>
> This doesn't make sense to me. The current behavior is to set err to 0
> (success):
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/shell/stat_all_metrics.sh?h=perf-tools-next#n18
> If a failure condition occurs then err is set to 1 (fail)
> unconditionally as you can't be more failing than failing, like:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/shell/stat_all_metrics.sh?h=perf-tools-next#n38
> If a skip condition is encountered then we set err to 2 (skip)
> conditional on the err state only being currently 0 (success) - ie
> don't turn a fail into a skip:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/shell/stat_all_metrics.sh?h=perf-tools-next#n45
>
> All metrics are always tested by test, so I'm not sure what "entire
> test suite" means. The test should report success if nothing skips or
> fails, skip if something skips and there are no failures, and
> otherwise failure.
We have different ideas for the return values. :) I think it should
report SKIP if it cannot test anything, FAILURE if anything fails and
otherwise SUCCESS.
So the gray area is when some subtests succeed and some skip (and no
failures). It'd be great if we can agree on one way or another.
>
> I can see the test being simplified by having a failure flag and a
> skip flag, then determining the 0, 1 or 2 value from these two flags.
> It would be avoiding testing the err value when setting it to 2
> (skip), but the change here isn't doing that. The change introduces a
> new value of 3, which seems more complex, and the skip flag is set
> depending on the global err value rather than just being a sticky flag
> showing a metric failed.
3 is not supposed to return, but I think it'd be nice if we can do
without introducing it.
Thanks,
Namhyung
next prev parent reply other threads:[~2026-01-10 0:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 1:18 [PATCH 1/4] perf test: Skip dlfilter test for build failures Namhyung Kim
2025-12-19 1:18 ` [PATCH 2/4] perf test: Use shelldir to refer perf source location Namhyung Kim
2026-01-09 23:17 ` Ian Rogers
2025-12-19 1:18 ` [PATCH 3/4] perf test: Do not skip when some metrics tests succeeded Namhyung Kim
2026-01-09 23:37 ` Ian Rogers
2026-01-10 0:26 ` Namhyung Kim [this message]
2025-12-19 1:18 ` [PATCH 4/4] perf test: Do not skip when some metric-group tests succeed Namhyung Kim
2026-01-09 23:39 ` Ian Rogers
2026-01-08 23:58 ` [PATCH 1/4] perf test: Skip dlfilter test for build failures Namhyung Kim
2026-01-09 23:16 ` Ian Rogers
2026-01-13 20:21 ` Arnaldo Carvalho de Melo
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=aWGcxpQXZZH5znwq@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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