perf test: Skip reason for suites with 1 test
When a suite has just 1 subtest, the subtest number is given as -1 to avoid indented printing. When this subtest number is seen for the skip reason, use the reason of the first test. Reviewed-by: John Garry <john.garry@huawei.com> Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Carsten Haitzler <carsten.haitzler@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Sohaib Mohamed <sohaib.amhmd@gmail.com> Cc: Stephane Eranian <eranian@google.com> Link: https://lore.kernel.org/r/20220518042027.836799-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
0b9462d0ac
commit
cfa5013a41
@ -137,10 +137,10 @@ static bool has_subtests(const struct test_suite *t)
|
|||||||
|
|
||||||
static const char *skip_reason(const struct test_suite *t, int subtest)
|
static const char *skip_reason(const struct test_suite *t, int subtest)
|
||||||
{
|
{
|
||||||
if (t->test_cases && subtest >= 0)
|
if (!t->test_cases)
|
||||||
return t->test_cases[subtest].skip_reason;
|
return NULL;
|
||||||
|
|
||||||
return NULL;
|
return t->test_cases[subtest >= 0 ? subtest : 0].skip_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *test_description(const struct test_suite *t, int subtest)
|
static const char *test_description(const struct test_suite *t, int subtest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user