diff options
author | Ian Rogers <[email protected]> | 2021-06-21 14:56:46 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-06-22 14:52:09 -0300 |
commit | e3c9cfd07dcbc9ae4208c17813998ce6f08e88df (patch) | |
tree | 38a044617e0915d8a96d600bf5f926ec4bea8a11 | |
parent | ce09673636f9581d2e2e24af785c463c030a1fd8 (diff) |
perf test: Pass the verbose option to shell tests
Having a verbose option will allow shell tests to provide extra failure
details when the fail or skip.
Committer notes:
Keep the 'script' variable at PATH_MAX, as its just something we'll pass
to system(), not really a "path", so being arbitrary, reduce the patch
size by not adding the three extra bytes to the 'script' variable.
Signed-off-by: Ian Rogers <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: [email protected]
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/tests/builtin-test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index cbbfe48ab802..41e3cf6bb66c 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -580,7 +580,10 @@ static int shell_test__run(struct test *test, int subdir __maybe_unused) char script[PATH_MAX]; struct shell_test *st = test->priv; - path__join(script, sizeof(script), st->dir, st->file); + path__join(script, sizeof(script) - 3, st->dir, st->file); + + if (verbose) + strncat(script, " -v", sizeof(script) - strlen(script) - 1); err = system(script); if (!err) |