linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] perf test: S390 does not support watchpoints in test 22
@ 2018-09-28  7:43 Thomas Richter
  2018-09-28  8:37 ` Ravi Bangoria
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Richter @ 2018-09-28  7:43 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme
  Cc: brueckner, schwidefsky, heiko.carstens, Thomas Richter

S390 does not support the perf_event_open system call for
attribute type PERF_TYPE_BREAKPOINT. This results in test
failure for test 22:

[root@s8360046 perf]# ./perf test 22
22: Watchpoint                                :
22.1: Read Only Watchpoint                    : FAILED!
22.2: Write Only Watchpoint                   : FAILED!
22.3: Read / Write Watchpoint                 : FAILED!
22.4: Modify Watchpoint                       : FAILED!
[root@s8360046 perf]#

Add s390 support to avoid these tests being executed on
s390 platform:

[root@s8360046 perf]# ./perf test 22
22: Watchpoint                                :
22.1: Read Only Watchpoint                    : Skip
22.2: Write Only Watchpoint                   : Skip
22.3: Read / Write Watchpoint                 : Skip
22.4: Modify Watchpoint                       : Skip
[root@s8360046 perf]#

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
---
 tools/perf/tests/builtin-test.c | 2 +-
 tools/perf/tests/wp.c           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 54ca7d87236f..e83c15a95c43 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -124,7 +124,7 @@ static struct test generic_tests[] = {
 		.desc = "Watchpoint",
 		.func = test__wp,
 		.subtest = {
-			.skip_if_fail	= false,
+			.skip_if_fail	= true,
 			.get_nr		= test__wp_subtest_get_nr,
 			.get_desc	= test__wp_subtest_get_desc,
 		},
diff --git a/tools/perf/tests/wp.c b/tools/perf/tests/wp.c
index 017a99317f94..85c66f978732 100644
--- a/tools/perf/tests/wp.c
+++ b/tools/perf/tests/wp.c
@@ -162,7 +162,7 @@ static int wp_modify_test(void)
 
 static bool wp_ro_supported(void)
 {
-#if defined (__x86_64__) || defined (__i386__)
+#if defined(__x86_64__) || defined(__i386__) || defined(__s390x__)
 	return false;
 #else
 	return true;
@@ -171,7 +171,7 @@ static bool wp_ro_supported(void)
 
 static void wp_ro_skip_msg(void)
 {
-#if defined (__x86_64__) || defined (__i386__)
+#if defined(__x86_64__) || defined (__i386__) || defined(__s390x__)
 	pr_debug("Hardware does not support read only watchpoints.\n");
 #endif
 }
-- 
2.17.0


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

* Re: [PATCH v2] perf test: S390 does not support watchpoints in test 22
  2018-09-28  7:43 [PATCH v2] perf test: S390 does not support watchpoints in test 22 Thomas Richter
@ 2018-09-28  8:37 ` Ravi Bangoria
  2018-09-28 10:02   ` Thomas-Mich Richter
  0 siblings, 1 reply; 5+ messages in thread
From: Ravi Bangoria @ 2018-09-28  8:37 UTC (permalink / raw)
  To: Thomas Richter
  Cc: linux-kernel, linux-perf-users, acme, brueckner, schwidefsky,
	heiko.carstens, Ravi Bangoria

Hi Thomas,

On 09/28/2018 01:13 PM, Thomas Richter wrote:
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 54ca7d87236f..e83c15a95c43 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -124,7 +124,7 @@ static struct test generic_tests[] = {
>  		.desc = "Watchpoint",
>  		.func = test__wp,
>  		.subtest = {
> -			.skip_if_fail	= false,
> +			.skip_if_fail	= true,

Can you instead use ".is_supported"?

Thanks,
Ravi


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

* Re: [PATCH v2] perf test: S390 does not support watchpoints in test 22
  2018-09-28  8:37 ` Ravi Bangoria
@ 2018-09-28 10:02   ` Thomas-Mich Richter
  2018-09-28 10:17     ` Ravi Bangoria
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas-Mich Richter @ 2018-09-28 10:02 UTC (permalink / raw)
  To: Ravi Bangoria
  Cc: linux-kernel, linux-perf-users, acme, brueckner, schwidefsky,
	heiko.carstens

On 09/28/2018 10:37 AM, Ravi Bangoria wrote:
> Hi Thomas,
> 
> On 09/28/2018 01:13 PM, Thomas Richter wrote:
>> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
>> index 54ca7d87236f..e83c15a95c43 100644
>> --- a/tools/perf/tests/builtin-test.c
>> +++ b/tools/perf/tests/builtin-test.c
>> @@ -124,7 +124,7 @@ static struct test generic_tests[] = {
>>  		.desc = "Watchpoint",
>>  		.func = test__wp,
>>  		.subtest = {
>> -			.skip_if_fail	= false,
>> +			.skip_if_fail	= true,
> 
> Can you instead use ".is_supported"?
> 
> Thanks,
> Ravi
> 

Hi Ravi,

I can rework the patch to use the is_supported() member function. The
down side is that the test does not show up in the list of executed tests anymore,
unless some debug output is enabled:

[root@s8360046 perf]# ./perf test -F 22
[root@s8360046 perf]# ./perf test -Fv 22
22: Watchpoint                                            : Disabled
[root@s8360046 perf]#

I leave it to Arnaldo to decide...

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


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

* Re: [PATCH v2] perf test: S390 does not support watchpoints in test 22
  2018-09-28 10:02   ` Thomas-Mich Richter
@ 2018-09-28 10:17     ` Ravi Bangoria
  2018-09-28 10:52       ` Thomas-Mich Richter
  0 siblings, 1 reply; 5+ messages in thread
From: Ravi Bangoria @ 2018-09-28 10:17 UTC (permalink / raw)
  To: Thomas-Mich Richter
  Cc: linux-kernel, linux-perf-users, acme, brueckner, schwidefsky,
	heiko.carstens, Ravi Bangoria

Hi Thomas,

On 09/28/2018 03:32 PM, Thomas-Mich Richter wrote:
> I can rework the patch to use the is_supported() member function. The
> down side is that the test does not show up in the list of executed tests anymore,
> unless some debug output is enabled:

Which should be fine because s390 is doing that in all breakpoint related tests.
But more important thing to suggest .is_supported field is, this patch has a
regression on x86:

Before:
  $ sudo ./perf test 22
  22: Watchpoint                                            :
  22.1: Read Only Watchpoint                                : Skip
  22.2: Write Only Watchpoint                               : Ok
  22.3: Read / Write Watchpoint                             : Ok
  22.4: Modify Watchpoint                                   : Ok

After:
  $ git apply 1.patch
  $ make
  $ sudo ./perf test 22
  22: Watchpoint                                            :
  22.1: Read Only Watchpoint                                : Skip
  22.2: Write Only Watchpoint                               : Skip
  22.3: Read / Write Watchpoint                             : Skip
  22.4: Modify Watchpoint                                   : Skip

Intel hw does not support read only watchpoitns. If you use skip_if_fail=true,
all subsequent testcases are skipped as well.

Thanks,
Ravi


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

* Re: [PATCH v2] perf test: S390 does not support watchpoints in test 22
  2018-09-28 10:17     ` Ravi Bangoria
@ 2018-09-28 10:52       ` Thomas-Mich Richter
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas-Mich Richter @ 2018-09-28 10:52 UTC (permalink / raw)
  To: Ravi Bangoria
  Cc: linux-kernel, linux-perf-users, acme, brueckner, schwidefsky,
	heiko.carstens

On 09/28/2018 12:17 PM, Ravi Bangoria wrote:
> Hi Thomas,
> 
> On 09/28/2018 03:32 PM, Thomas-Mich Richter wrote:
>> I can rework the patch to use the is_supported() member function. The
>> down side is that the test does not show up in the list of executed tests anymore,
>> unless some debug output is enabled:
> 
> Which should be fine because s390 is doing that in all breakpoint related tests.
> But more important thing to suggest .is_supported field is, this patch has a
> regression on x86:
> 
> Before:
>   $ sudo ./perf test 22
>   22: Watchpoint                                            :
>   22.1: Read Only Watchpoint                                : Skip
>   22.2: Write Only Watchpoint                               : Ok
>   22.3: Read / Write Watchpoint                             : Ok
>   22.4: Modify Watchpoint                                   : Ok
> 
> After:
>   $ git apply 1.patch
>   $ make
>   $ sudo ./perf test 22
>   22: Watchpoint                                            :
>   22.1: Read Only Watchpoint                                : Skip
>   22.2: Write Only Watchpoint                               : Skip
>   22.3: Read / Write Watchpoint                             : Skip
>   22.4: Modify Watchpoint                                   : Skip
> 
> Intel hw does not support read only watchpoitns. If you use skip_if_fail=true,
> all subsequent testcases are skipped as well.
> 
> Thanks,
> Ravi
> 

Ahhh  ....  thanks a lot for the hint, will post version 3.

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


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

end of thread, other threads:[~2018-09-28 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28  7:43 [PATCH v2] perf test: S390 does not support watchpoints in test 22 Thomas Richter
2018-09-28  8:37 ` Ravi Bangoria
2018-09-28 10:02   ` Thomas-Mich Richter
2018-09-28 10:17     ` Ravi Bangoria
2018-09-28 10:52       ` Thomas-Mich Richter

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