public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL
@ 2024-08-15  9:47 Andreas Schwab
  2024-08-15 10:15 ` Petr Vorel
  2024-08-15 11:27 ` Martin Doucha
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2024-08-15  9:47 UTC (permalink / raw)
  To: ltp

A request for an unsupported perf event can also result in EINVAL.

Signed-off-by: Andreas Schwab <schwab@suse.de>
---
 testcases/kernel/syscalls/perf_event_open/perf_event_open01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c
index 30c0d7594..86a134b51 100644
--- a/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c
+++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c
@@ -148,7 +148,7 @@ static void verify(struct test_case_t *tc)
 	TEST(perf_event_open(&pe, 0, -1, -1, 0));
 	if (TEST_RETURN == -1) {
 		if (TEST_ERRNO == ENOENT || TEST_ERRNO == EOPNOTSUPP ||
-		    TEST_ERRNO == ENODEV) {
+		    TEST_ERRNO == ENODEV || TEST_ERRNO == EINVAL) {
 			tst_resm(TCONF | TTERRNO,
 			         "perf_event_open for %s not supported",
 			         tc->config_name);
-- 
2.46.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL
  2024-08-15  9:47 [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL Andreas Schwab
@ 2024-08-15 10:15 ` Petr Vorel
  2024-08-15 10:26   ` Andreas Schwab
  2024-08-15 11:27 ` Martin Doucha
  1 sibling, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2024-08-15 10:15 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: ltp

Hi Andreas,

> A request for an unsupported perf event can also result in EINVAL.

Thanks for fixing LTP!
Yes, man page mentions this.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Out of curiosity, what are you fixing?
(Which kernel, arch, which event gives that).

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL
  2024-08-15 10:15 ` Petr Vorel
@ 2024-08-15 10:26   ` Andreas Schwab
  2024-08-15 13:30     ` Petr Vorel
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2024-08-15 10:26 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Aug 15 2024, Petr Vorel wrote:

> Out of curiosity, what are you fixing?

perf_event_open01    1  TFAIL  :  perf_event_open01.c:156: perf_event_open PERF_COUNT_HW_INSTRUCTIONS failed unexpectedly: TEST_ERRNO=EINVAL(22): Invalid argument

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL
  2024-08-15  9:47 [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL Andreas Schwab
  2024-08-15 10:15 ` Petr Vorel
@ 2024-08-15 11:27 ` Martin Doucha
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Doucha @ 2024-08-15 11:27 UTC (permalink / raw)
  To: Andreas Schwab, ltp

Hi,
thanks for the patch.

Reviewed-by: Martin Doucha <mdoucha@suse.cz>

On 15. 08. 24 11:47, Andreas Schwab wrote:
> A request for an unsupported perf event can also result in EINVAL.
> 
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
>   testcases/kernel/syscalls/perf_event_open/perf_event_open01.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c
> index 30c0d7594..86a134b51 100644
> --- a/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c
> +++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open01.c
> @@ -148,7 +148,7 @@ static void verify(struct test_case_t *tc)
>   	TEST(perf_event_open(&pe, 0, -1, -1, 0));
>   	if (TEST_RETURN == -1) {
>   		if (TEST_ERRNO == ENOENT || TEST_ERRNO == EOPNOTSUPP ||
> -		    TEST_ERRNO == ENODEV) {
> +		    TEST_ERRNO == ENODEV || TEST_ERRNO == EINVAL) {
>   			tst_resm(TCONF | TTERRNO,
>   			         "perf_event_open for %s not supported",
>   			         tc->config_name);

-- 
Martin Doucha   mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL
  2024-08-15 10:26   ` Andreas Schwab
@ 2024-08-15 13:30     ` Petr Vorel
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2024-08-15 13:30 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: ltp

Hi all,

thanks, merged!

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2024-08-15 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15  9:47 [LTP] [PATCH] syscalls/perf_event_open01: Allow EINVAL Andreas Schwab
2024-08-15 10:15 ` Petr Vorel
2024-08-15 10:26   ` Andreas Schwab
2024-08-15 13:30     ` Petr Vorel
2024-08-15 11:27 ` Martin Doucha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox