[LTP] [PATCH] syscalls/mq_notify: Don't fail if mq_notify is not supported

Punit Agrawal punit1.agrawal@toshiba.co.jp
Mon Oct 5 11:20:29 CEST 2020


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



More information about the ltp mailing list