[LTP] [PATCH 07/18] vma03: accept ENOMEM return value from mremap
Punit Agrawal
punit.agrawal@arm.com
Thu Oct 26 16:14:36 CEST 2017
From: Will Deacon <will.deacon@arm.com>
Attempting to map a wrapping region with mremap should fail (that's the
whole point of this test). Accept ENOMEM as well as EINVAL.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
testcases/kernel/mem/vma/vma03.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
index 4b34ab0a0..5f231e5bb 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
remap = mremap(map, pgsz, 2 * pgsz, 0);
if (remap == MAP_FAILED) {
- if (errno == EINVAL)
+ if (errno == EINVAL || errno == ENOMEM)
tst_resm(TPASS, "mremap failed as expected.");
else
tst_resm(TFAIL | TERRNO, "mremap");
--
2.14.2
More information about the ltp
mailing list