From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] mmap15: don't fail if mmap returns EINVAL
Date: Fri, 22 Aug 2014 16:05:16 +0800 [thread overview]
Message-ID: <53F6F9BC.3040504@cn.fujitsu.com> (raw)
In-Reply-To: <77268e159df98c56fa62012617a7c3f3b918f6b7.1408689882.git.jstancek@redhat.com>
On 08/22/2014 02:45 PM, Jan Stancek wrote:
> Older kernels (2.6.32) on ppc64 return EINVAL instead of ENOMEM.
>
> Man page says:
> "EINVAL We don’t like addr, length, or offset (e.g., they are too large,
> or not aligned on a page boundary).", which suggests that both
> ENOMEM and EINVAL should be considered.
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
> testcases/kernel/syscalls/mmap/mmap15.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/mmap/mmap15.c b/testcases/kernel/syscalls/mmap/mmap15.c
> index 49dbba4..f1fc267 100644
> --- a/testcases/kernel/syscalls/mmap/mmap15.c
> +++ b/testcases/kernel/syscalls/mmap/mmap15.c
> @@ -80,10 +80,10 @@ int main(int ac, char **av)
> continue;
> }
>
> - if (errno != ENOMEM) {
> + if (errno != ENOMEM && errno != EINVAL) {
> tst_resm(TFAIL | TERRNO, "mmap into high region "
> "failed unexpectedly - expect "
> - "errno=ENOMEM, got");
> + "errno=ENOMEM/EINVAL, got");
> } else {
> tst_resm(TPASS | TERRNO, "mmap into high region "
> "failed as expected");
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-08-22 8:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 6:45 [LTP] [PATCH] mmap15: don't fail if mmap returns EINVAL Jan Stancek
2014-08-22 8:05 ` Wanlong Gao [this message]
2014-08-22 13:35 ` Stanislav Kholmanskikh
[not found] ` <CAE1O6mgqn51jh-ib5vXUL8P2kBuJMbG1Wg6WPFp8y2p6Vp74kQ@mail.gmail.com>
2014-08-25 11:07 ` chrubis
[not found] ` <1721706552.12305163.1408967269010.JavaMail.zimbra@redhat.com>
2014-08-25 12:05 ` chrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F6F9BC.3040504@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.