From: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.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 17:35:56 +0400 [thread overview]
Message-ID: <53F7473C.5010306@oracle.com> (raw)
In-Reply-To: <53F6F9BC.3040504@cn.fujitsu.com>
On 08/22/2014 12:05 PM, Wanlong Gao wrote:
> 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>
Modern sparc64 kernels return EINVAL as well.
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.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");
Maybe add this ENOMEM/EINVAL in the comment few stings above:
/* Attempt to mmap into highmem addr, should get ENOMEM */
?
Thanks.
>> } 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
>
------------------------------------------------------------------------------
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 13:36 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
2014-08-22 13:35 ` Stanislav Kholmanskikh [this message]
[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=53F7473C.5010306@oracle.com \
--to=stanislav.kholmanskikh@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox