Skip to contentSkip to conversation

mmapstress03: consider passed when returning EINVAL in the large mmap test.

PATCH In review nobuhiro 2 participants 2 messages Jun 16, 2009 – Jun 18, 2009

lore
Share & tools
lore

nobuhiro

author
#0 lore raw

PATCH 1/1 mmapstress03: consider passed when returning EINVAL in the large mmap test.

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).

---
 testcases/kernel/mem/mmapstress/mmapstress03.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/mem/mmapstress/mmapstress03.c +2 -2
index 8b41959..3ce5540 100644
@@ -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);
Signature · 13 lines
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
#1 lore raw
Quoted 5 lines · nobuhiro

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).

Thanks.

Regards--
Subrata

Quoted 9 lines
---
 testcases/kernel/mem/mmapstress/mmapstress03.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/mem/mmapstress/mmapstress03.c +0 -0
index 8b41959..3ce5540 100644

testcases/kernel/mem/mmapstress/mmapstress03.c main(int argc, char *argv[]) · line 173

Quoted 10 lines
testcases/kernel/mem/mmapstress/mmapstress03.c +2 -2
@@ -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);

------------------------------------------------------------------------------
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