[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230629083546.3031488-1-ricardo.canuelo@collabora.com>
Date: Thu, 29 Jun 2023 10:35:46 +0200
From: Ricardo Cañuelo <ricardo.canuelo@...labora.com>
To: shuah@...nel.org
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...labora.com, naresh.kamboju@...aro.org,
dan.carpenter@...aro.org, skhan@...uxfoundation.org
Subject: [RESEND PATCH] selftests/mincore: fix skip condition for check_huge_pages test
The check_huge_pages test was failing instead of skipping on qemu-armv7
because the skip condition wasn't handled properly. Add an additional
check to fix it.
Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@...labora.com>
Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
Tested-by: Anders Roxell <anders.roxell@...aro.org>
Closes: https://lore.kernel.org/all/CA+G9fYuoB8Ug8PcTU-YGmemL7_eeEksXFihvxWF6OikD7sK7pA@mail.gmail.com
---
tools/testing/selftests/mincore/mincore_selftest.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mincore/mincore_selftest.c b/tools/testing/selftests/mincore/mincore_selftest.c
index 4c88238fc8f0..6fb3eea5b6ee 100644
--- a/tools/testing/selftests/mincore/mincore_selftest.c
+++ b/tools/testing/selftests/mincore/mincore_selftest.c
@@ -150,8 +149,8 @@ TEST(check_huge_pages)
MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB,
-1, 0);
if (addr == MAP_FAILED) {
- if (errno == ENOMEM)
- SKIP(return, "No huge pages available.");
+ if (errno == ENOMEM || errno == EINVAL)
+ SKIP(return, "No huge pages available or CONFIG_HUGETLB_PAGE disabled.");
else
TH_LOG("mmap error: %s", strerror(errno));
}
--
2.25.1
Powered by blists - more mailing lists