diff mbox series

syscalls/mmap15: relax condition a bit

Message ID 1fbbf1d06b0e08fc2b078c0ad24f2dd2111348c3.1536827409.git.jstancek@redhat.com
State Accepted
Headers show
Series syscalls/mmap15: relax condition a bit | expand

Commit Message

Jan Stancek Sept. 13, 2018, 8:30 a.m. UTC
High address is arch specific, and it also occasionally changes
as can be seen in history of this test.

Relax the condition and accept both ENOMEM and EINVAL
as expected outcome.

Fixes: #390

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/syscalls/mmap/mmap15.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Cyril Hrubis Sept. 13, 2018, 12:28 p.m. UTC | #1
Hi!
> High address is arch specific, and it also occasionally changes
> as can be seen in history of this test.
> 
> Relax the condition and accept both ENOMEM and EINVAL
> as expected outcome.
> 
> Fixes: #390

I've already acked that on GitHub...

But just for a clarity, acked.
Jan Stancek Sept. 14, 2018, 12:21 p.m. UTC | #2
----- Original Message -----
> Hi!
> > High address is arch specific, and it also occasionally changes
> > as can be seen in history of this test.
> > 
> > Relax the condition and accept both ENOMEM and EINVAL
> > as expected outcome.
> > 
> > Fixes: #390
> 
> I've already acked that on GitHub...
> 
> But just for a clarity, acked.

Pushed.

> 
> --
> Cyril Hrubis
> chrubis@suse.cz
>
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/mmap/mmap15.c b/testcases/kernel/syscalls/mmap/mmap15.c
index eff27d6585e0..c8a77873a254 100644
--- a/testcases/kernel/syscalls/mmap/mmap15.c
+++ b/testcases/kernel/syscalls/mmap/mmap15.c
@@ -80,10 +80,9 @@  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");
+				 "failed unexpectedly");
 		} else {
 			tst_resm(TPASS | TERRNO, "mmap into high region "
 				 "failed as expected");