perf test: print if shell directory isn't present
Ian Rogers
reviewerPATCH 1/1 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.
--- tools/perf/tests/builtin-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/perf/tests/builtin-test.c +4 -1
@@ -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++;
Signature · 1 line
2.25.1.481.gfbce0eb801-goog
Quoted 4 lines · 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 <[email protected]>
thanks,
jirka
Quoted 24 lines
--- tools/perf/tests/builtin-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)tools/perf/tests/builtin-test.c +4
-1@@ -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++;Signature · 1 line
2.25.1.481.gfbce0eb801-goog
Arnaldo Carvalho de Melo
AppliedEm Fri, Mar 13, 2020 at 10:37:34AM +0100, Jiri Olsa escreveu:
Quoted 7 lines · Ian Rogers
Quoted 4 lines
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 <[email protected]>Acked-by Jiri Olsa <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 28 lines
thanks,
jirkaQuoted 24 lines
--- tools/perf/tests/builtin-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)tools/perf/tests/builtin-test.c +4
-1@@ -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++;Signature · 1 line
2.25.1.481.gfbce0eb801-goog
Signature · 1 line
- Arnaldo
[tip: perf/core] perf test: Print if shell directory isn't present
In reply to Ian RogersThe following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Thu, 12 Mar 2020 17:56:02 -07:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/tests/builtin-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/perf/tests/builtin-test.c +4 -1
@@ -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++;