Musl and glibc syscall wrappers handles the null mq name in different ways and report different errors. Glibc reports EINVAL error if the mq_name is not preceded by "/" character but musl library does not treat this as an error and invokes the kernel mq_open syscall which finally fails with ENOENT error.
Introduce an alternative return error ENOENT so that this test passes with musl library.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- changes in v3: *) Retain the mq_open library call and add new error code for musl failure as suggested by Beata.
testcases/kernel/syscalls/mq_open/mq_open01.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c index cd2a229d8..8a229d298 100644 --- a/testcases/kernel/syscalls/mq_open/mq_open01.c +++ b/testcases/kernel/syscalls/mq_open/mq_open01.c @@ -34,6 +34,7 @@ struct test_case { struct mq_attr *rq; int ret; int err; + int alt_err; void (*setup)(void); void (*cleanup)(void); }; @@ -96,6 +97,7 @@ static struct test_case tcase[] = { .oflag = O_CREAT, .ret = -1, .err = EINVAL, + .alt_err = ENOENT, /* Musl library reports this error for empty mqueue name */ }, { .desc = "NORMAL", @@ -260,9 +262,11 @@ static void do_test(unsigned int i) }
if (TST_ERR != tc->err) { - tst_res(TFAIL | TTERRNO, "%s expected errno: %d", - tc->desc, TST_ERR); - goto CLEANUP; + if (TST_ERR != tc->alt_err) { + tst_res(TFAIL | TTERRNO, "%s expected errno: %d", + tc->desc, TST_ERR); + goto CLEANUP; + } }
if (TST_RET != tc->ret) {
Enable struct siginfo and struct sigevent related signal syscall tests in the extended PCuABI syscall list which are impacted by the changes in morello kernel due struct siginfo and sigevent modifications. The syscalls directly affected by these changes are mq_notify, timer_create, rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait.
While at it enable other mq, timer and pidfd related syscalls for completeness.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- runtest/morello_transitional_extended | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 240dec83f..f936ad80e 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -47,6 +47,21 @@ keyctl07 keyctl07 keyctl08 keyctl08 keyctl09 keyctl09
+mq_open01 mq_open01 +mq_notify01 mq_notify01 +mq_notify02 mq_notify02 +mq_timedsend01 mq_timedsend01 +mq_timedreceive01 mq_timedreceive01 +mq_unlink01 mq_unlink01 + +pidfd_open01 pidfd_open01 +pidfd_open02 pidfd_open02 +pidfd_open03 pidfd_open03 +pidfd_open04 pidfd_open04 +pidfd_send_signal01 pidfd_send_signal01 +pidfd_send_signal02 pidfd_send_signal02 +pidfd_send_signal03 pidfd_send_signal03 + ptrace01 ptrace01 ptrace02 ptrace02 ptrace03 ptrace03 @@ -55,6 +70,9 @@ ptrace05 ptrace05 #ptrace06 ptrace06 ptrace11 ptrace11
+rt_sigqueueinfo01 rt_sigqueueinfo01 +rt_tgsigqueueinfo01 rt_tgsigqueueinfo01 + semctl01 semctl01 semctl02 semctl02 semctl03 semctl03 @@ -76,3 +94,9 @@ semop03 semop03 shmat01 shmat01 shmat02 shmat02 shmat03 shmat03 + +timer_create01 timer_create01 +timer_create02 timer_create02 +timer_create03 timer_create03 +timer_delete01 timer_delete01 +timer_delete02 timer_delete02
Hi Amit,
On Wed, Jan 18, 2023 at 04:58:35PM +0530, Amit Daniel Kachhap wrote:
Enable struct siginfo and struct sigevent related signal syscall tests in the extended PCuABI syscall list which are impacted by the changes in morello kernel due struct siginfo and sigevent modifications. The syscalls
s/due/due to
Otherwise LGTM. Again, can amend when aplying the patch.
--- BR B.
directly affected by these changes are mq_notify, timer_create, rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait.
While at it enable other mq, timer and pidfd related syscalls for completeness.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
runtest/morello_transitional_extended | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 240dec83f..f936ad80e 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -47,6 +47,21 @@ keyctl07 keyctl07 keyctl08 keyctl08 keyctl09 keyctl09 +mq_open01 mq_open01 +mq_notify01 mq_notify01 +mq_notify02 mq_notify02 +mq_timedsend01 mq_timedsend01 +mq_timedreceive01 mq_timedreceive01 +mq_unlink01 mq_unlink01
+pidfd_open01 pidfd_open01 +pidfd_open02 pidfd_open02 +pidfd_open03 pidfd_open03 +pidfd_open04 pidfd_open04 +pidfd_send_signal01 pidfd_send_signal01 +pidfd_send_signal02 pidfd_send_signal02 +pidfd_send_signal03 pidfd_send_signal03
ptrace01 ptrace01 ptrace02 ptrace02 ptrace03 ptrace03 @@ -55,6 +70,9 @@ ptrace05 ptrace05 #ptrace06 ptrace06 ptrace11 ptrace11 +rt_sigqueueinfo01 rt_sigqueueinfo01 +rt_tgsigqueueinfo01 rt_tgsigqueueinfo01
semctl01 semctl01 semctl02 semctl02 semctl03 semctl03 @@ -76,3 +94,9 @@ semop03 semop03 shmat01 shmat01 shmat02 shmat02 shmat03 shmat03
+timer_create01 timer_create01 +timer_create02 timer_create02 +timer_create03 timer_create03 +timer_delete01 timer_delete01
+timer_delete02 timer_delete02
2.25.1
Hi,
On 1/25/23 14:50, Beata Michalska wrote:
Hi Amit,
On Wed, Jan 18, 2023 at 04:58:35PM +0530, Amit Daniel Kachhap wrote:
Enable struct siginfo and struct sigevent related signal syscall tests in the extended PCuABI syscall list which are impacted by the changes in morello kernel due struct siginfo and sigevent modifications. The syscalls
s/due/due to
Otherwise LGTM. Again, can amend when aplying the patch.
Please go head.
Amit
BR B.
directly affected by these changes are mq_notify, timer_create, rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait.
While at it enable other mq, timer and pidfd related syscalls for completeness.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
runtest/morello_transitional_extended | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 240dec83f..f936ad80e 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -47,6 +47,21 @@ keyctl07 keyctl07 keyctl08 keyctl08 keyctl09 keyctl09 +mq_open01 mq_open01 +mq_notify01 mq_notify01 +mq_notify02 mq_notify02 +mq_timedsend01 mq_timedsend01 +mq_timedreceive01 mq_timedreceive01 +mq_unlink01 mq_unlink01
+pidfd_open01 pidfd_open01 +pidfd_open02 pidfd_open02 +pidfd_open03 pidfd_open03 +pidfd_open04 pidfd_open04 +pidfd_send_signal01 pidfd_send_signal01 +pidfd_send_signal02 pidfd_send_signal02 +pidfd_send_signal03 pidfd_send_signal03
- ptrace01 ptrace01 ptrace02 ptrace02 ptrace03 ptrace03
@@ -55,6 +70,9 @@ ptrace05 ptrace05 #ptrace06 ptrace06 ptrace11 ptrace11 +rt_sigqueueinfo01 rt_sigqueueinfo01 +rt_tgsigqueueinfo01 rt_tgsigqueueinfo01
- semctl01 semctl01 semctl02 semctl02 semctl03 semctl03
@@ -76,3 +94,9 @@ semop03 semop03 shmat01 shmat01 shmat02 shmat02 shmat03 shmat03
+timer_create01 timer_create01 +timer_create02 timer_create02 +timer_create03 timer_create03 +timer_delete01 timer_delete01
+timer_delete02 timer_delete02
2.25.1
On Thu, Feb 09, 2023 at 05:48:09PM +0530, Amit Daniel Kachhap wrote:
Hi,
On 1/25/23 14:50, Beata Michalska wrote:
Hi Amit,
On Wed, Jan 18, 2023 at 04:58:35PM +0530, Amit Daniel Kachhap wrote:
Enable struct siginfo and struct sigevent related signal syscall tests in the extended PCuABI syscall list which are impacted by the changes in morello kernel due struct siginfo and sigevent modifications. The syscalls
s/due/due to
Otherwise LGTM. Again, can amend when aplying the patch.
Please go head.
Now on next. Thanks!
--- BR B.
Amit
BR B.
directly affected by these changes are mq_notify, timer_create, rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait.
While at it enable other mq, timer and pidfd related syscalls for completeness.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
runtest/morello_transitional_extended | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 240dec83f..f936ad80e 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -47,6 +47,21 @@ keyctl07 keyctl07 keyctl08 keyctl08 keyctl09 keyctl09 +mq_open01 mq_open01 +mq_notify01 mq_notify01 +mq_notify02 mq_notify02 +mq_timedsend01 mq_timedsend01 +mq_timedreceive01 mq_timedreceive01 +mq_unlink01 mq_unlink01
+pidfd_open01 pidfd_open01 +pidfd_open02 pidfd_open02 +pidfd_open03 pidfd_open03 +pidfd_open04 pidfd_open04 +pidfd_send_signal01 pidfd_send_signal01 +pidfd_send_signal02 pidfd_send_signal02 +pidfd_send_signal03 pidfd_send_signal03
- ptrace01 ptrace01 ptrace02 ptrace02 ptrace03 ptrace03
@@ -55,6 +70,9 @@ ptrace05 ptrace05 #ptrace06 ptrace06 ptrace11 ptrace11 +rt_sigqueueinfo01 rt_sigqueueinfo01 +rt_tgsigqueueinfo01 rt_tgsigqueueinfo01
- semctl01 semctl01 semctl02 semctl02 semctl03 semctl03
@@ -76,3 +94,9 @@ semop03 semop03 shmat01 shmat01 shmat02 shmat02 shmat03 shmat03
+timer_create01 timer_create01 +timer_create02 timer_create02 +timer_create03 timer_create03 +timer_delete01 timer_delete01
+timer_delete02 timer_delete02
2.25.1
linux-morello-ltp mailing list -- linux-morello-ltp@op-lists.linaro.org To unsubscribe send an email to linux-morello-ltp-leave@op-lists.linaro.org
Hi Amit,
All looks good - thanks for those changes. There is only one minor gramma issue in the commit message but I can amend that while applying the patch, if you are ok with it.
--- BR B. On Wed, Jan 18, 2023 at 04:58:34PM +0530, Amit Daniel Kachhap wrote:
Musl and glibc syscall wrappers handles the null mq name in different
s/handles/handle
ways and report different errors. Glibc reports EINVAL error if the mq_name is not preceded by "/" character but musl library does not treat this as an error and invokes the kernel mq_open syscall which finally fails with ENOENT error.
Introduce an alternative return error ENOENT so that this test passes with musl library.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
changes in v3: *) Retain the mq_open library call and add new error code for musl failure as suggested by Beata.
testcases/kernel/syscalls/mq_open/mq_open01.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c index cd2a229d8..8a229d298 100644 --- a/testcases/kernel/syscalls/mq_open/mq_open01.c +++ b/testcases/kernel/syscalls/mq_open/mq_open01.c @@ -34,6 +34,7 @@ struct test_case { struct mq_attr *rq; int ret; int err;
- int alt_err; void (*setup)(void); void (*cleanup)(void);
}; @@ -96,6 +97,7 @@ static struct test_case tcase[] = { .oflag = O_CREAT, .ret = -1, .err = EINVAL,
}, { .desc = "NORMAL",.alt_err = ENOENT, /* Musl library reports this error for empty mqueue name */
@@ -260,9 +262,11 @@ static void do_test(unsigned int i) } if (TST_ERR != tc->err) {
tst_res(TFAIL | TTERRNO, "%s expected errno: %d",
tc->desc, TST_ERR);
goto CLEANUP;
if (TST_ERR != tc->alt_err) {
tst_res(TFAIL | TTERRNO, "%s expected errno: %d",
tc->desc, TST_ERR);
goto CLEANUP;
}}
if (TST_RET != tc->ret) { -- 2.25.1
Hi,
On 1/25/23 14:48, Beata Michalska wrote:
Hi Amit,
All looks good - thanks for those changes. There is only one minor gramma issue in the commit message but I can amend that while applying the patch, if you are ok with it.
Please go ahead and apply them. I struggled with my mail client and messed up replying.
Amit
BR B. On Wed, Jan 18, 2023 at 04:58:34PM +0530, Amit Daniel Kachhap wrote:
Musl and glibc syscall wrappers handles the null mq name in different
s/handles/handle
ways and report different errors. Glibc reports EINVAL error if the mq_name is not preceded by "/" character but musl library does not treat this as an error and invokes the kernel mq_open syscall which finally fails with ENOENT error.
Introduce an alternative return error ENOENT so that this test passes with musl library.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
changes in v3: *) Retain the mq_open library call and add new error code for musl failure as suggested by Beata.
testcases/kernel/syscalls/mq_open/mq_open01.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c index cd2a229d8..8a229d298 100644 --- a/testcases/kernel/syscalls/mq_open/mq_open01.c +++ b/testcases/kernel/syscalls/mq_open/mq_open01.c @@ -34,6 +34,7 @@ struct test_case { struct mq_attr *rq; int ret; int err;
- int alt_err; void (*setup)(void); void (*cleanup)(void); };
@@ -96,6 +97,7 @@ static struct test_case tcase[] = { .oflag = O_CREAT, .ret = -1, .err = EINVAL,
}, { .desc = "NORMAL",.alt_err = ENOENT, /* Musl library reports this error for empty mqueue name */
@@ -260,9 +262,11 @@ static void do_test(unsigned int i) } if (TST_ERR != tc->err) {
tst_res(TFAIL | TTERRNO, "%s expected errno: %d",
tc->desc, TST_ERR);
goto CLEANUP;
if (TST_ERR != tc->alt_err) {
tst_res(TFAIL | TTERRNO, "%s expected errno: %d",
tc->desc, TST_ERR);
goto CLEANUP;
}}
if (TST_RET != tc->ret) { -- 2.25.1
On Thu, Feb 09, 2023 at 05:47:00PM +0530, Amit Daniel Kachhap wrote:
Hi,
On 1/25/23 14:48, Beata Michalska wrote:
Hi Amit,
All looks good - thanks for those changes. There is only one minor gramma issue in the commit message but I can amend that while applying the patch, if you are ok with it.
Please go ahead and apply them. I struggled with my mail client and messed up replying.
Now on next. Thanks!
--- BR B.
Amit
BR B. On Wed, Jan 18, 2023 at 04:58:34PM +0530, Amit Daniel Kachhap wrote:
Musl and glibc syscall wrappers handles the null mq name in different
s/handles/handle
ways and report different errors. Glibc reports EINVAL error if the mq_name is not preceded by "/" character but musl library does not treat this as an error and invokes the kernel mq_open syscall which finally fails with ENOENT error.
Introduce an alternative return error ENOENT so that this test passes with musl library.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
changes in v3: *) Retain the mq_open library call and add new error code for musl failure as suggested by Beata.
testcases/kernel/syscalls/mq_open/mq_open01.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c index cd2a229d8..8a229d298 100644 --- a/testcases/kernel/syscalls/mq_open/mq_open01.c +++ b/testcases/kernel/syscalls/mq_open/mq_open01.c @@ -34,6 +34,7 @@ struct test_case { struct mq_attr *rq; int ret; int err;
- int alt_err; void (*setup)(void); void (*cleanup)(void); };
@@ -96,6 +97,7 @@ static struct test_case tcase[] = { .oflag = O_CREAT, .ret = -1, .err = EINVAL,
}, { .desc = "NORMAL",.alt_err = ENOENT, /* Musl library reports this error for empty mqueue name */
@@ -260,9 +262,11 @@ static void do_test(unsigned int i) } if (TST_ERR != tc->err) {
tst_res(TFAIL | TTERRNO, "%s expected errno: %d",
tc->desc, TST_ERR);
goto CLEANUP;
if (TST_ERR != tc->alt_err) {
tst_res(TFAIL | TTERRNO, "%s expected errno: %d",
tc->desc, TST_ERR);
goto CLEANUP;
} if (TST_RET != tc->ret) {}
-- 2.25.1
linux-morello-ltp@op-lists.linaro.org