On 19/10/2022 15:35, Beata Michalska wrote:
On Tue, Oct 18, 2022 at 03:23:54PM +0100, Tudor Cretu wrote:
On 18-10-2022 13:55, Teo Couprie Diaz wrote:
On 18/10/2022 13:33, Tudor Cretu wrote:
Hi Teo,
On 18-10-2022 09:46, Teo Couprie Diaz wrote:
brk is disabled in purecap so in normal operation the test would be skipped by LTP. If that is not the case, guarantee the test will fail.
Add brk01 and brk02 to the morello_transitional_extended list.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
� runtest/morello_transitional_extended |� 2 ++ � testcases/kernel/syscalls/brk/brk01.c | 13 +++++++++++++ � 2 files changed, 15 insertions(+)
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 067fe82da..8ddab7095 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -1,5 +1,7 @@ � #DESCRIPTION: Morello transitional extended ABI system calls � +brk01 brk02
This should be: +brk01 brk01 +brk02 brk02
Right, my mistake.
� epoll_create01 epoll_create01 � epoll_create02 epoll_create02 � epoll_create1_01 epoll_create1_01 diff --git a/testcases/kernel/syscalls/brk/brk01.c b/testcases/kernel/syscalls/brk/brk01.c index c16b46eaa..5157a5605 100644 --- a/testcases/kernel/syscalls/brk/brk01.c +++ b/testcases/kernel/syscalls/brk/brk01.c
Shouldn't a similar change be needed for brk02.c ?
It could, but I chose not do. My reasoning is that brk02 will SKIP in purecap if it's implemented correctly. If that's not the case, brk01 will FAIL, well, without fail. To me we don't gain more information in forcing a failure in brk02 like in brk01, they end up being the exact same tests in purecap while being completely different in compat : brk01 testing the basic availability and brk02 testing more complex scenarios.
What do you think ?
Sounds fine to me. If you want, you can mention why it's fine to keep brk02.c as it is in the commit message.
Actually it would be very much appreciated if the justification for that would end up in the commit message.
I agree, I did add in preparation for the v2. However as I will call syscall() directly now, I might have to change the behavior a bit as brk02 won't be skipped automatically then.
BR B.
Thanks, Téo
Thanks, Tudor
@@ -9,7 +9,19 @@ � #include <errno.h> � � #include "tst_test.h" +#include "lapi/syscalls.h" � +#ifdef __CHERI_PURE_CAPABILITY__ +void verify_brk(void) +{ +��� /* +���� * tst_syscall skips the test if the syscall returns -ENOSYS, +���� * which is the expected behavior in purecap. +���� */ +��� tst_syscall(__NR_brk, 0); +��� tst_res(TFAIL, "brk should not be implemented in purecap"); +} +#else
nit: I would prefer to have a single verify_brk(void), and the ifdef __CHERI_PURE_CAPABILITY__ block should be inside the function. Up to you though.
That's fair !
Thanks, Tudor
Thanks for the review, T�o
� void verify_brk(void) � { ����� uintptr_t cur_brk, new_brk; @@ -65,6 +77,7 @@ void verify_brk(void) � ����� tst_res(TPASS, "brk() works fine"); � } +#endif /* __CHERI_PURE_CAPABILITY__ */ � � static struct tst_test test = { ����� .test_all = verify_brk,
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