All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported
@ 2020-10-05  9:20 Punit Agrawal
  2020-10-13  4:22 ` Punit Agrawal
  2020-10-13 12:25 ` Cyril Hrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Punit Agrawal @ 2020-10-05  9:20 UTC (permalink / raw)
  To: ltp

When CONFIG_POSIX_MQUEUE is configured off, the mq_notify02 test
erroneously reports a failure rather than a missing configuration.

Update the test case to call this out separate to the failure case.

Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
---
Hi,

Noticed the issue while analysing test report on a system with
CONFIG_POSIX_MQUEUE turned off.

Please cc me on comments as I'm not subscribed to the list.

Thanks,
Punit

 testcases/kernel/syscalls/mq_notify/mq_notify02.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify02.c b/testcases/kernel/syscalls/mq_notify/mq_notify02.c
index fe59b5a11..e2269cd8e 100644
--- a/testcases/kernel/syscalls/mq_notify/mq_notify02.c
+++ b/testcases/kernel/syscalls/mq_notify/mq_notify02.c
@@ -77,6 +77,8 @@ static void mq_notify_verify(struct test_case_t *test)
 
 	if (TEST_ERRNO == test->exp_errno) {
 		tst_resm(TPASS | TTERRNO, "mq_notify failed as expected");
+	} else if (TEST_ERRNO == ENOSYS) {
+		tst_resm(TCONF | TTERRNO, "mq_notify not available (ENOSYS)");
 	} else {
 		tst_resm(TFAIL | TTERRNO,
 			 "mq_notify failed unexpectedly; expected: %d - %s",
-- 
2.28.0


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

* [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported
  2020-10-05  9:20 [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported Punit Agrawal
@ 2020-10-13  4:22 ` Punit Agrawal
  2020-10-13 12:25 ` Cyril Hrubis
  1 sibling, 0 replies; 4+ messages in thread
From: Punit Agrawal @ 2020-10-13  4:22 UTC (permalink / raw)
  To: ltp

[ cc'ing Petr and Cyril ]

Punit Agrawal <punit1.agrawal@toshiba.co.jp> writes:

> When CONFIG_POSIX_MQUEUE is configured off, the mq_notify02 test
> erroneously reports a failure rather than a missing configuration.
>
> Update the test case to call this out separate to the failure case.
>
> Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
> ---
> Hi,
>
> Noticed the issue while analysing test report on a system with
> CONFIG_POSIX_MQUEUE turned off.
>
> Please cc me on comments as I'm not subscribed to the list.
>
> Thanks,
> Punit
>
>  testcases/kernel/syscalls/mq_notify/mq_notify02.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify02.c b/testcases/kernel/syscalls/mq_notify/mq_notify02.c
> index fe59b5a11..e2269cd8e 100644
> --- a/testcases/kernel/syscalls/mq_notify/mq_notify02.c
> +++ b/testcases/kernel/syscalls/mq_notify/mq_notify02.c
> @@ -77,6 +77,8 @@ static void mq_notify_verify(struct test_case_t *test)
>  
>  	if (TEST_ERRNO == test->exp_errno) {
>  		tst_resm(TPASS | TTERRNO, "mq_notify failed as expected");
> +	} else if (TEST_ERRNO == ENOSYS) {
> +		tst_resm(TCONF | TTERRNO, "mq_notify not available (ENOSYS)");
>  	} else {
>  		tst_resm(TFAIL | TTERRNO,
>  			 "mq_notify failed unexpectedly; expected: %d - %s",

If there are no issues with the patch, it would be great to get this
patch merged.

Thanks,
Punit

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

* [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported
  2020-10-05  9:20 [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported Punit Agrawal
  2020-10-13  4:22 ` Punit Agrawal
@ 2020-10-13 12:25 ` Cyril Hrubis
  2020-10-14  0:44   ` Punit Agrawal
  1 sibling, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2020-10-13 12:25 UTC (permalink / raw)
  To: ltp

Hi!
> +	} else if (TEST_ERRNO == ENOSYS) {
> +		tst_resm(TCONF | TTERRNO, "mq_notify not available (ENOSYS)");

Pushed with a minor change, removed the ENOSYS from the string since it
will be printed because of the TTERRNO flag, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported
  2020-10-13 12:25 ` Cyril Hrubis
@ 2020-10-14  0:44   ` Punit Agrawal
  0 siblings, 0 replies; 4+ messages in thread
From: Punit Agrawal @ 2020-10-14  0:44 UTC (permalink / raw)
  To: ltp

Hi Cyril,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> +	} else if (TEST_ERRNO == ENOSYS) {
>> +		tst_resm(TCONF | TTERRNO, "mq_notify not available (ENOSYS)");
>
> Pushed with a minor change, removed the ENOSYS from the string since it
> will be printed because of the TTERRNO flag, thanks.

I see the committed patch. Thanks for fixing it up.

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

end of thread, other threads:[~2020-10-14  0:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05  9:20 [LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported Punit Agrawal
2020-10-13  4:22 ` Punit Agrawal
2020-10-13 12:25 ` Cyril Hrubis
2020-10-14  0:44   ` Punit Agrawal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.