MAP_GROWSDOWN is not supported in PCuABI, check that EOPNOTSUPP is returned by mmap() as specified and skip the tests.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- testcases/kernel/syscalls/mmap/mmap18.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/testcases/kernel/syscalls/mmap/mmap18.c b/testcases/kernel/syscalls/mmap/mmap18.c index b37b29890ca0..ed483942622c 100644 --- a/testcases/kernel/syscalls/mmap/mmap18.c +++ b/testcases/kernel/syscalls/mmap/mmap18.c @@ -77,6 +77,13 @@ static void setup(void) tst_brk(TCONF, "Test can't be performed with stack grows up architecture");
page_size = getpagesize(); + +#ifdef __CHERI_PURE_CAPABILITY__ + TST_EXP_FAIL(mmap(NULL, page_size, PROT_READ, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN, -1, 0), + EOPNOTSUPP, "MAP_GROWSDOWN is not supported in purecap"); + tst_brk(TCONF, "Cannot test MAP_GROWSDOWN in purecap: not supported"); +#endif }
/*