Skip to contentSkip to conversation

read02: Fix the failure of mips architecture test

PATCH Superseded zhanglianjie 1 participant 1 message May 27, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 read02: Fix the failure of mips architecture test

under mips architecture, writing to the buf of mmap PROT_NONE will report an error EPERM.

testcases/kernel/syscalls/read/read02.c +3 -1
index 9199a95f6..ab1c15970 100644
@@ -52,7 +52,9 @@ static struct tcase {
 } tcases[] = {
 	{&badfd, &bufaddr, 1, EBADF},
 	{&fd2, &bufaddr, 1, EISDIR},
-#ifndef UCLINUX
+#if defined( __mips)
+	{&fd3, &outside_buf, 1, EPERM},
+#elif !defined(UCLINUX)
 	{&fd3, &outside_buf, 1, EFAULT},
 #endif
 	{&fd4, &addr4, 1, EINVAL},

--
2.20.1