Skip to contentSkip to conversation

syscalls/mq_notify: Don't fail if mq_notify is not supported

PATCH New Punit Agrawal 2 participants 4 messages Oct 5, 2020 – Oct 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/mq_notify: Don't fail if mq_notify is not supported

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.

---
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(+)
testcases/kernel/syscalls/mq_notify/mq_notify02.c +2 -0
index fe59b5a11..e2269cd8e 100644
@@ -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",
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 syscalls/mq_notify: Don't fail if mq_notify is not supported

[ cc'ing Petr and Cyril ]

Quoted 25 lines · Punit Agrawal

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.

---
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(+)
testcases/kernel/syscalls/mq_notify/mq_notify02.c +0 -0
index fe59b5a11..e2269cd8e 100644

testcases/kernel/syscalls/mq_notify/mq_notify02.c static void mq_notify_verify(struct test_case_t *test) · line 84

Quoted 8 lines
testcases/kernel/syscalls/mq_notify/mq_notify02.c +2 -0
@@ -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

#2 lore raw

PATCH 1/1 syscalls/mq_notify: Don't fail if mq_notify is not supported

In reply to Punit Agrawal

Hi!

testcases/kernel/syscalls/mq_notify/mq_notify02.c static void mq_notify_verify(struct test_case_t *test) · line 81

Quoted 2 lines
testcases/kernel/syscalls/mq_notify/mq_notify02.c +2 -0
+	} 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.

Signature · 2 lines
Cyril Hrubis
[email protected]
#3 lore raw

PATCH 1/1 syscalls/mq_notify: Don't fail if mq_notify is not supported

Hi Cyril,

Quoted 6 lines · Cyril Hrubis

Hi!

testcases/kernel/syscalls/mq_notify/mq_notify02.c static void mq_notify_verify(struct test_case_t *test) · line 81

Quoted 2 lines
testcases/kernel/syscalls/mq_notify/mq_notify02.c +2 -0
+	} 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.