From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>, shuah@kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
linux-kselftest@vger.kernel.org, kernel@collabora.com,
naresh.kamboju@linaro.org, dan.carpenter@linaro.org
Subject: Re: [PATCH] selftests/mincore: fix skip condition for check_huge_pages test
Date: Tue, 6 Jun 2023 13:04:05 +0500 [thread overview]
Message-ID: <9ef625e1-eb00-535f-8cec-5291e71ef913@collabora.com> (raw)
In-Reply-To: <20230515132643.119809-1-ricardo.canuelo@collabora.com>
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
prev parent reply other threads:[~2023-06-06 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ef625e1-eb00-535f-8cec-5291e71ef913@collabora.com \
--to=usama.anjum@collabora.com \
--cc=dan.carpenter@linaro.org \
--cc=kernel@collabora.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=ricardo.canuelo@collabora.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox