linux-kernel.vger.kernel.org archive mirror
 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

* Re: [PATCH] perf test: print if shell directory isn't present
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2020-03-13  9:37 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Namhyung Kim, Adrian Hunter,
	Andi Kleen, Leo Yan, linux-kernel, Stephane Eranian

On Thu, Mar 12, 2020 at 05:56:02PM -0700, Ian Rogers wrote:
> 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>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  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	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf test: print if shell directory isn't present
  2020-03-13  9:37 ` Jiri Olsa
@ 2020-03-13 18:44   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-03-13 18:44 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ian Rogers, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Namhyung Kim, Adrian Hunter, Andi Kleen,
	Leo Yan, linux-kernel, Stephane Eranian

Em Fri, Mar 13, 2020 at 10:37:34AM +0100, Jiri Olsa escreveu:
> On Thu, Mar 12, 2020 at 05:56:02PM -0700, Ian Rogers wrote:
> > 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>
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied.

- Arnaldo
 
> thanks,
> jirka
> 
> > ---
> >  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
> > 
> 

-- 

- Arnaldo

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

* [tip: perf/core] perf test: Print if shell directory isn't present
  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-19 14:10 ` tip-bot2 for Ian Rogers
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Ian Rogers @ 2020-03-19 14:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Ian Rogers, Jiri Olsa, Adrian Hunter, Alexander Shishkin,
	Andi Kleen, Leo Yan, Mark Rutland, Namhyung Kim, Peter Zijlstra,
	Stephane Eranian, Arnaldo Carvalho de Melo, x86, LKML

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     b2bf6660709c3bdd92d7558f4aa3cf07c0b0dda8
Gitweb:        https://git.kernel.org/tip/b2bf6660709c3bdd92d7558f4aa3cf07c0b0dda8
Author:        Ian Rogers <irogers@google.com>
AuthorDate:    Thu, 12 Mar 2020 17:56:02 -07:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Fri, 13 Mar 2020 15:43:43 -03:00

perf test: Print if shell directory isn't present

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>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200313005602.45236-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 5f05db7..54d9516 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++;

^ 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).