linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
@ 2017-09-08 12:01 Thomas Meyer
  2017-09-08 12:01 ` [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script Thomas Meyer
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thomas Meyer @ 2017-09-08 12:01 UTC (permalink / raw)
  To: linux-kernel, linux-kselftest, shuah; +Cc: Thomas Meyer

The multiple_kprobes test case fails to check for KPROBE_EVENT support.
Add the check to prevent a false test result.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
 tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
index 2a1cb9908746..a4fd4c851a5b 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
@@ -1,6 +1,8 @@
 #!/bin/sh
 # description: Register/unregister many kprobe events
 
+[ -f kprobe_events ] || exit_unsupported # this is configurable
+
 # ftrace fentry skip size depends on the machine architecture.
 # Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc64le
 case `uname -m` in
-- 
2.11.0

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

* [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script
  2017-09-08 12:01 [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Thomas Meyer
@ 2017-09-08 12:01 ` Thomas Meyer
  2017-09-14 14:59   ` Shuah Khan
  2017-09-08 12:01 ` [PATCH 3/3] selftests/net: msg_zerocopy enable build with older kernel headers Thomas Meyer
  2017-09-14 14:58 ` [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Shuah Khan
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Meyer @ 2017-09-08 12:01 UTC (permalink / raw)
  To: linux-kernel, linux-kselftest, shuah; +Cc: Thomas Meyer

Both test programs are being compiled by make, so no need to compile both
programs in the runner script.
This resolves an error when installing all selftests via make install
and run them in a different environemnt.

Running tests in intel_pstate
========================================
./run.sh: line 35: gcc: command not found
Problem compiling aperf.c.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
 tools/testing/selftests/intel_pstate/run.sh | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
index 7868c106b8b1..96878e44f465 100755
--- a/tools/testing/selftests/intel_pstate/run.sh
+++ b/tools/testing/selftests/intel_pstate/run.sh
@@ -31,12 +31,6 @@ EVALUATE_ONLY=0
 
 max_cpus=$(($(nproc)-1))
 
-# compile programs
-gcc aperf.c -Wall -D_GNU_SOURCE -o aperf  -lm
-[ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1
-gcc -o msr msr.c -lm
-[ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1
-
 function run_test () {
 
 	file_ext=$1
-- 
2.11.0

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

* [PATCH 3/3] selftests/net: msg_zerocopy enable build with older kernel headers
  2017-09-08 12:01 [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Thomas Meyer
  2017-09-08 12:01 ` [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script Thomas Meyer
@ 2017-09-08 12:01 ` Thomas Meyer
  2017-09-14 14:58 ` [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Shuah Khan
  2 siblings, 0 replies; 10+ messages in thread
From: Thomas Meyer @ 2017-09-08 12:01 UTC (permalink / raw)
  To: linux-kernel, linux-kselftest, shuah; +Cc: Thomas Meyer

Explicitly define SO_EE_ORIGIN_ZEROCOPY.
This makes the test program build with older kernel headers,
e.g. from Debian 9.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
 tools/testing/selftests/net/msg_zerocopy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
index 40232af5b023..3ab6ec403905 100644
--- a/tools/testing/selftests/net/msg_zerocopy.c
+++ b/tools/testing/selftests/net/msg_zerocopy.c
@@ -55,7 +55,7 @@
 #include <unistd.h>
 
 #ifndef SO_EE_ORIGIN_ZEROCOPY
-#define SO_EE_ORIGIN_ZEROCOPY		SO_EE_ORIGIN_UPAGE
+#define SO_EE_ORIGIN_ZEROCOPY		5
 #endif
 
 #ifndef SO_ZEROCOPY
-- 
2.11.0

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

* Re: [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
  2017-09-08 12:01 [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Thomas Meyer
  2017-09-08 12:01 ` [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script Thomas Meyer
  2017-09-08 12:01 ` [PATCH 3/3] selftests/net: msg_zerocopy enable build with older kernel headers Thomas Meyer
@ 2017-09-14 14:58 ` Shuah Khan
  2017-09-14 15:15   ` Masami Hiramatsu
  2 siblings, 1 reply; 10+ messages in thread
From: Shuah Khan @ 2017-09-14 14:58 UTC (permalink / raw)
  To: Thomas Meyer, linux-kernel, linux-kselftest, Masami Hiramatsu,
	Steven Rostedt, Shuah Khan, Shuah Khan

On 09/08/2017 06:01 AM, Thomas Meyer wrote:
> The multiple_kprobes test case fails to check for KPROBE_EVENT support.
> Add the check to prevent a false test result.
> 
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>  tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
> index 2a1cb9908746..a4fd4c851a5b 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
> @@ -1,6 +1,8 @@
>  #!/bin/sh
>  # description: Register/unregister many kprobe events
>  
> +[ -f kprobe_events ] || exit_unsupported # this is configurable
> +
>  # ftrace fentry skip size depends on the machine architecture.
>  # Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc64le
>  case `uname -m` in
> 

Hi Steve/Masami,

This patch looks good to me. Adds a check similar to the one one in
tools/testing/selftests/ftrace/test.d/kprobe/functions

If you don't have objections, I will get this into 4.14-rc2 or rc3

thanks,
-- Shuah

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

* Re: [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script
  2017-09-08 12:01 ` [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script Thomas Meyer
@ 2017-09-14 14:59   ` Shuah Khan
  0 siblings, 0 replies; 10+ messages in thread
From: Shuah Khan @ 2017-09-14 14:59 UTC (permalink / raw)
  To: Thomas Meyer, linux-kernel, linux-kselftest, Shuah Khan; +Cc: Shuah Khan

On 09/08/2017 06:01 AM, Thomas Meyer wrote:
> Both test programs are being compiled by make, so no need to compile both
> programs in the runner script.
> This resolves an error when installing all selftests via make install
> and run them in a different environemnt.
> 
> Running tests in intel_pstate
> ========================================
> ./run.sh: line 35: gcc: command not found
> Problem compiling aperf.c.
> 
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>  tools/testing/selftests/intel_pstate/run.sh | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
> index 7868c106b8b1..96878e44f465 100755
> --- a/tools/testing/selftests/intel_pstate/run.sh
> +++ b/tools/testing/selftests/intel_pstate/run.sh
> @@ -31,12 +31,6 @@ EVALUATE_ONLY=0
>  
>  max_cpus=$(($(nproc)-1))
>  
> -# compile programs
> -gcc aperf.c -Wall -D_GNU_SOURCE -o aperf  -lm
> -[ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1
> -gcc -o msr msr.c -lm
> -[ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1
> -
>  function run_test () {
>  
>  	file_ext=$1
> 
Thanks for the patch. I will get this into 4.14-rc2 or rc3

thanks,
-- Shuah

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

* Re: [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
  2017-09-14 14:58 ` [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Shuah Khan
@ 2017-09-14 15:15   ` Masami Hiramatsu
  2017-09-15 19:10     ` Steven Rostedt
  2017-09-18 15:18     ` Steven Rostedt
  0 siblings, 2 replies; 10+ messages in thread
From: Masami Hiramatsu @ 2017-09-14 15:15 UTC (permalink / raw)
  To: shuah
  Cc: Thomas Meyer, linux-kernel, linux-kselftest, Steven Rostedt, Shuah Khan

On Thu, 14 Sep 2017 08:58:20 -0600
Shuah Khan <shuah@kernel.org> wrote:

> On 09/08/2017 06:01 AM, Thomas Meyer wrote:
> > The multiple_kprobes test case fails to check for KPROBE_EVENT support.
> > Add the check to prevent a false test result.
> > 
> > Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> > ---
> >  tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
> > index 2a1cb9908746..a4fd4c851a5b 100644
> > --- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
> > @@ -1,6 +1,8 @@
> >  #!/bin/sh
> >  # description: Register/unregister many kprobe events
> >  
> > +[ -f kprobe_events ] || exit_unsupported # this is configurable
> > +
> >  # ftrace fentry skip size depends on the machine architecture.
> >  # Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc64le
> >  case `uname -m` in
> > 
> 
> Hi Steve/Masami,
> 
> This patch looks good to me. Adds a check similar to the one one in
> tools/testing/selftests/ftrace/test.d/kprobe/functions

Yes, this looks good to me too :)

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> 
> If you don't have objections, I will get this into 4.14-rc2 or rc3
> 
> thanks,
> -- Shuah
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Masami Hiramatsu <mhiramat@kernel.org>

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

* Re: [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
  2017-09-14 15:15   ` Masami Hiramatsu
@ 2017-09-15 19:10     ` Steven Rostedt
  2017-09-18 15:18     ` Steven Rostedt
  1 sibling, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2017-09-15 19:10 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: shuah, Thomas Meyer, linux-kernel, linux-kselftest, Shuah Khan

On Thu, 14 Sep 2017 08:15:19 -0700
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Yes, this looks good to me too :)

Agreed.

> 
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

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

* Re: [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
  2017-09-14 15:15   ` Masami Hiramatsu
  2017-09-15 19:10     ` Steven Rostedt
@ 2017-09-18 15:18     ` Steven Rostedt
  2017-09-18 15:19       ` Shuah Khan
  1 sibling, 1 reply; 10+ messages in thread
From: Steven Rostedt @ 2017-09-18 15:18 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: shuah, Thomas Meyer, linux-kernel, linux-kselftest, Shuah Khan

On Thu, 14 Sep 2017 08:15:19 -0700
Masami Hiramatsu <mhiramat@kernel.org> wrote:


> > Hi Steve/Masami,
> > 
> > This patch looks good to me. Adds a check similar to the one one in
> > tools/testing/selftests/ftrace/test.d/kprobe/functions  
> 
> Yes, this looks good to me too :)
> 
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
> 

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

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

* Re: [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
  2017-09-18 15:18     ` Steven Rostedt
@ 2017-09-18 15:19       ` Shuah Khan
  2017-09-19 14:47         ` Shuah Khan
  0 siblings, 1 reply; 10+ messages in thread
From: Shuah Khan @ 2017-09-18 15:19 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu
  Cc: shuah, Thomas Meyer, linux-kernel, linux-kselftest, Shuah Khan

On 09/18/2017 09:18 AM, Steven Rostedt wrote:
> On Thu, 14 Sep 2017 08:15:19 -0700
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> 
>>> Hi Steve/Masami,
>>>
>>> This patch looks good to me. Adds a check similar to the one one in
>>> tools/testing/selftests/ftrace/test.d/kprobe/functions  
>>
>> Yes, this looks good to me too :)
>>
>> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
>>
> 
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> -- Steve
> 

Thanks Steve and Masami,

I will get this into rc2

thanks,
-- Shuah

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

* Re: [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support
  2017-09-18 15:19       ` Shuah Khan
@ 2017-09-19 14:47         ` Shuah Khan
  0 siblings, 0 replies; 10+ messages in thread
From: Shuah Khan @ 2017-09-19 14:47 UTC (permalink / raw)
  To: Shuah Khan, Steven Rostedt, Masami Hiramatsu
  Cc: Thomas Meyer, linux-kernel, linux-kselftest, Shuah Khan

On 09/18/2017 09:19 AM, Shuah Khan wrote:
> On 09/18/2017 09:18 AM, Steven Rostedt wrote:
>> On Thu, 14 Sep 2017 08:15:19 -0700
>> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>>
>>
>>>> Hi Steve/Masami,
>>>>
>>>> This patch looks good to me. Adds a check similar to the one one in
>>>> tools/testing/selftests/ftrace/test.d/kprobe/functions  
>>>
>>> Yes, this looks good to me too :)
>>>
>>> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
>>>
>>
>> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>>
>> -- Steve
>>
> 
> Thanks Steve and Masami,
> 
> I will get this into rc2
> 

Applied to linux-kselftest fixes 4.14-rc2

thanks,
-- Shuah

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

end of thread, other threads:[~2017-09-19 14:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-08 12:01 [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Thomas Meyer
2017-09-08 12:01 ` [PATCH 2/3] selftests/intel_pstate: No need to compile test progs in the run script Thomas Meyer
2017-09-14 14:59   ` Shuah Khan
2017-09-08 12:01 ` [PATCH 3/3] selftests/net: msg_zerocopy enable build with older kernel headers Thomas Meyer
2017-09-14 14:58 ` [PATCH 1/3] selftests/ftrace: multiple_kprobes: Also check for support Shuah Khan
2017-09-14 15:15   ` Masami Hiramatsu
2017-09-15 19:10     ` Steven Rostedt
2017-09-18 15:18     ` Steven Rostedt
2017-09-18 15:19       ` Shuah Khan
2017-09-19 14:47         ` Shuah Khan

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).