Some architectures may return EINVAL instead of ENOMEM.
This should also be ok according to mmap manual:
EINVAL We don't like addr, length, or offset (e.g., they are too large, or not 
aligned on a page boundary).

Signed-off-by: nobuhiro <[email protected]>
---
 testcases/kernel/mem/mmapstress/mmapstress03.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/mem/mmapstress/mmapstress03.c 
b/testcases/kernel/mem/mmapstress/mmapstress03.c
index 8b41959..3ce5540 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress03.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress03.c
@@ -166,8 +166,8 @@ main(int argc, char *argv[])
                ERROR("really large mmap didn't fail");
                 anyfail();
        }
-       if (errno != ENOMEM) {
-               ERROR("really large mmap didn't set errno = ENOMEM");
+       if (errno != ENOMEM && errno != EINVAL) {
+               ERROR("really large mmap didn't set errno = ENOMEM nor EINVAL");
                 anyfail();
        }
        (void)time(&t);
-- 
1.6.3


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to