* [PATCH] selftests/mincore: fix skip condition for check_huge_pages test
@ 2023-05-15 13:26 Ricardo Cañuelo
2023-05-17 10:23 ` Anders Roxell
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ricardo Cañuelo @ 2023-05-15 13:26 UTC (permalink / raw)
To: shuah; +Cc: linux-kselftest, kernel, naresh.kamboju, dan.carpenter
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@collabora.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-by: Linux Kernel Functional Testing <lkft@linaro.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/mincore: fix skip condition for check_huge_pages test
2023-05-15 13:26 [PATCH] selftests/mincore: fix skip condition for check_huge_pages test Ricardo Cañuelo
@ 2023-05-17 10:23 ` Anders Roxell
2023-06-06 7:09 ` Ricardo Cañuelo
2023-06-06 8:04 ` Muhammad Usama Anjum
2 siblings, 0 replies; 4+ messages in thread
From: Anders Roxell @ 2023-05-17 10:23 UTC (permalink / raw)
To: Ricardo Cañuelo
Cc: shuah, linux-kselftest, kernel, naresh.kamboju, dan.carpenter
On 2023-05-15 15:26, Ricardo Cañuelo wrote:
> 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@collabora.com>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Closes: https://lore.kernel.org/all/CA+G9fYuoB8Ug8PcTU-YGmemL7_eeEksXFihvxWF6OikD7sK7pA@mail.gmail.com
Tested-by: Anders Roxell <anders.roxell@linaro.org>
This is how I tested it on Linux next tag: next-20230516. Installed
tuxmake [1], and tuxrun [2].
$ tuxmake --runtime podman --target-arch arm --toolchain gcc-12 \
--kconfig defconfig \
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft.config \
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/systemd.config \
--kconfig-add CONFIG_ARM_TI_CPUFREQ=y --kconfig-add CONFIG_SERIAL_8250_OMAP=y --kconfig-add CONFIG_POSIX_MQUEUE=y \
--kconfig-add CONFIG_OF=y --kconfig-add CONFIG_SYN_COOKIES=y--kconfig-add CONFIG_SCHEDSTATS=y --kconfig-add CONFIG_AHCI_DWC=y \
dtbs dtbs-legacy headers kernel kselftest modules \
--results-hook "tuxrun --runtime podman --device qemu-armv7 --boot-args rw --tuxmake ./ --rootfs https://storage.tuxboot.com/debian/bookworm/armhf/rootfs.ext4.xz --parameters SKIPFILE=skipfile-lkft.yaml --parameters KSELFTEST='\$BUILD'/kselftest.tar.xz --tests kselftest-mincore --timeouts boot=30"
Cheers,
Anders
[1] https://tuxmake.org/
[2] https://tuxrun.org/
> ---
> 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
>
--
Anders Roxell
anders.roxell@linaro.org
M: +46 708 22 71 05 | IRC: roxell
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/mincore: fix skip condition for check_huge_pages test
2023-05-15 13:26 [PATCH] selftests/mincore: fix skip condition for check_huge_pages test Ricardo Cañuelo
2023-05-17 10:23 ` Anders Roxell
@ 2023-06-06 7:09 ` Ricardo Cañuelo
2023-06-06 8:04 ` Muhammad Usama Anjum
2 siblings, 0 replies; 4+ messages in thread
From: Ricardo Cañuelo @ 2023-06-06 7:09 UTC (permalink / raw)
To: shuah; +Cc: linux-kselftest, kernel, naresh.kamboju, dan.carpenter
Hi Shuah,
On 15/5/23 15:26, Ricardo Cañuelo wrote:
> 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@collabora.com>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Closes: https://lore.kernel.org/all/CA+G9fYuoB8Ug8PcTU-YGmemL7_eeEksXFihvxWF6OikD7sK7pA@mail.gmail.com
Gentle ping about this, I still haven't seen it merged.
Cheers,
Ricardo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/mincore: fix skip condition for check_huge_pages test
2023-05-15 13:26 [PATCH] selftests/mincore: fix skip condition for check_huge_pages test Ricardo Cañuelo
2023-05-17 10:23 ` Anders Roxell
2023-06-06 7:09 ` Ricardo Cañuelo
@ 2023-06-06 8:04 ` Muhammad Usama Anjum
2 siblings, 0 replies; 4+ messages in thread
From: Muhammad Usama Anjum @ 2023-06-06 8:04 UTC (permalink / raw)
To: Ricardo Cañuelo, shuah
Cc: Muhammad Usama Anjum, linux-kselftest, kernel, naresh.kamboju,
dan.carpenter
On 5/15/23 6:26 PM, Ricardo Cañuelo wrote:
> 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@collabora.com>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Closes: https://lore.kernel.org/all/CA+G9fYuoB8Ug8PcTU-YGmemL7_eeEksXFihvxWF6OikD7sK7pA@mail.gmail.com
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.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));
> }
--
BR,
Muhammad Usama Anjum
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-06 8:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 13:26 [PATCH] selftests/mincore: fix skip condition for check_huge_pages test Ricardo Cañuelo
2023-05-17 10:23 ` Anders Roxell
2023-06-06 7:09 ` Ricardo Cañuelo
2023-06-06 8:04 ` Muhammad Usama Anjum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox