Commit e3c9cfd0 authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarIan Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: bpf@vger.kernel.org
Link: http://lore.kernel.org/lkml/20210621215648.2991319-1-irogers@google.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ce096736
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)