All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf test: print if shell directory isn't present
@ 2020-03-13  0:56 Ian Rogers
  2020-03-13  9:37 ` Jiri Olsa
  2020-03-19 14:10 ` [tip: perf/core] perf test: Print " tip-bot2 for Ian Rogers
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Rogers @ 2020-03-13  0:56 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Andi Kleen, Leo Yan, linux-kernel
  Cc: Stephane Eranian, Ian Rogers

If the shell test directory isn't present the exit code will be 255 but
with no error messages printed. Add an error message.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/tests/builtin-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 5f05db75cdd8..54d9516c9839 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -543,8 +543,11 @@ static int run_shell_tests(int argc, const char *argv[], int i, int width)
 		return -1;
 
 	dir = opendir(st.dir);
-	if (!dir)
+	if (!dir) {
+		pr_err("failed to open shell test directory: %s\n",
+			st.dir);
 		return -1;
+	}
 
 	for_each_shell_test(dir, st.dir, ent) {
 		int curr = i++;
-- 
2.25.1.481.gfbce0eb801-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-19 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-13  0:56 [PATCH] perf test: print if shell directory isn't present Ian Rogers
2020-03-13  9:37 ` Jiri Olsa
2020-03-13 18:44   ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] perf test: Print " tip-bot2 for Ian Rogers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.