diff options
author | Michael Petlan <mpetlan@redhat.com> | 2018-11-22 00:39:18 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-12-18 18:21:44 +0300 |
commit | 4eaf97e8c5b13d01dd3c3b00181b6eed208aec01 (patch) | |
tree | 17ee4488b279f227ab2f831c7f7b051fa3a36caf /tools/perf/tests/builtin-test.c | |
parent | 571766010ea6bf9726b288eb2db1abb59b1841af (diff) | |
download | linux-4eaf97e8c5b13d01dd3c3b00181b6eed208aec01.tar.xz |
perf tests: Use shebangs in the shell scripts
Since the first line was used as a test identification, it needs to be
skipped by shell_test__description() function now.
Further notes from Hendrik:
It might be worth to note that adding the shebang is necessary to spot
them as scripts.
Using /bin/sh looks fine to. Just briefly checked whether the scripts
contains some bash-specifics, which is not the case.
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
LPU-Reference: 2127419430.57657104.1542836358464.JavaMail.zimbra@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 12c09e0ece71..9852b5d624a5 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -424,6 +424,9 @@ static const char *shell_test__description(char *description, size_t size, if (!fp) return NULL; + /* Skip shebang */ + while (fgetc(fp) != '\n'); + description = fgets(description, size, fp); fclose(fp); |