* [LTP] [PATCH] mmapstress03: consider passed when returning EINVAL in the large mmap test.
@ 2009-06-16 9:45 nobuhiro
2009-06-18 17:31 ` Subrata Modak
0 siblings, 1 reply; 2+ messages in thread
From: nobuhiro @ 2009-06-16 9:45 UTC (permalink / raw)
To: ltp-list
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 <nobuhiro@andestech.com>
---
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] mmapstress03: consider passed when returning EINVAL in the large mmap test.
2009-06-16 9:45 [LTP] [PATCH] mmapstress03: consider passed when returning EINVAL in the large mmap test nobuhiro
@ 2009-06-18 17:31 ` Subrata Modak
0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2009-06-18 17:31 UTC (permalink / raw)
To: nobuhiro; +Cc: ltp-list
On Tue, 2009-06-16 at 17:45 +0800, nobuhiro wrote:
> 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 <nobuhiro@andestech.com>
Thanks.
Regards--
Subrata
> ---
> 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);
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-18 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-16 9:45 [LTP] [PATCH] mmapstress03: consider passed when returning EINVAL in the large mmap test nobuhiro
2009-06-18 17:31 ` Subrata Modak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.