mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-06 02:06:40 +07:00
perf test: Do not abort tests on error
Run through all tests regardless of failures. On errors, return the first error code detected. Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1345572195-23857-2-git-send-email-robert.richter@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
d45a3e0068
commit
9bfbbc6d1e
@ -948,19 +948,19 @@ static int test_event(struct test__event_st *e)
|
|||||||
|
|
||||||
static int test_events(struct test__event_st *events, unsigned cnt)
|
static int test_events(struct test__event_st *events, unsigned cnt)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret1, ret2 = 0;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
struct test__event_st *e = &events[i];
|
struct test__event_st *e = &events[i];
|
||||||
|
|
||||||
pr_debug("running test %d '%s'\n", i, e->name);
|
pr_debug("running test %d '%s'\n", i, e->name);
|
||||||
ret = test_event(e);
|
ret1 = test_event(e);
|
||||||
if (ret)
|
if (ret1)
|
||||||
break;
|
ret2 = ret1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_term(struct test__term *t)
|
static int test_term(struct test__term *t)
|
||||||
@ -1021,13 +1021,13 @@ static int test_pmu(void)
|
|||||||
|
|
||||||
int parse_events__test(void)
|
int parse_events__test(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret1, ret2 = 0;
|
||||||
|
|
||||||
#define TEST_EVENTS(tests) \
|
#define TEST_EVENTS(tests) \
|
||||||
do { \
|
do { \
|
||||||
ret = test_events(tests, ARRAY_SIZE(tests)); \
|
ret1 = test_events(tests, ARRAY_SIZE(tests)); \
|
||||||
if (ret) \
|
if (!ret2) \
|
||||||
return ret; \
|
ret2 = ret1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
TEST_EVENTS(test__events);
|
TEST_EVENTS(test__events);
|
||||||
@ -1035,5 +1035,9 @@ do { \
|
|||||||
if (test_pmu())
|
if (test_pmu())
|
||||||
TEST_EVENTS(test__events_pmu);
|
TEST_EVENTS(test__events_pmu);
|
||||||
|
|
||||||
return test_terms(test__terms, ARRAY_SIZE(test__terms));
|
ret1 = test_terms(test__terms, ARRAY_SIZE(test__terms));
|
||||||
|
if (!ret2)
|
||||||
|
ret2 = ret1;
|
||||||
|
|
||||||
|
return ret2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user