Commit b33b8731 authored by Ricardo Cañuelo's avatar Ricardo Cañuelo Committed by Shuah Khan

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: default avatarRicardo Cañuelo <ricardo.canuelo@collabora.com>
Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Reviewed-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Closes: https://lore.kernel.org/all/CA+G9fYuoB8Ug8PcTU-YGmemL7_eeEksXFihvxWF6OikD7sK7pA@mail.gmail.comSigned-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 06c2afb8
......@@ -150,8 +150,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));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment