Commit 4eaf97e8 authored by Michael Petlan's avatar Michael Petlan Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarMichael Petlan <mpetlan@redhat.com>
Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
LPU-Reference: 2127419430.57657104.1542836358464.JavaMail.zimbra@redhat.com
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 57176601
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);

+1 −0
Original line number Diff line number Diff line
#!/bin/sh
# Add vfs_getname probe to get syscall args filenames
#
# Arnaldo Carvalho de Melo <acme@kernel.org>, 2017
+1 −0
Original line number Diff line number Diff line
#!/bin/sh
# probe libc's inet_pton & backtrace it with ping

# Installs a probe on libc's inet_pton function, that will use uprobes,
+1 −0
Original line number Diff line number Diff line
#!/bin/sh
# Use vfs_getname probe to get syscall args filenames

# Uses the 'perf test shell' library to add probe:vfs_getname to the system
+1 −0
Original line number Diff line number Diff line
#!/bin/sh
# Check open filename arg using perf trace + vfs_getname

# Uses the 'perf test shell' library to add probe:vfs_getname to the system