[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88d8d030-c37d-433f-82f7-aed4f3a0fe4a@redhat.com>
Date: Thu, 6 Mar 2025 10:34:18 +0100
From: David Hildenbrand <david@...hat.com>
To: Brendan Jackman <jackmanb@...gle.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>
Cc: Dev Jain <dev.jain@....com>, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 01/10] selftests/mm: Report errno when things fail in
gup_longterm
>
> /*
> * TODO: if the kernel ever supports long-term R/W pinning on
> @@ -202,7 +204,8 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared)
> /* Skip on errors, as we might just lack kernel support. */
> ret = io_uring_queue_init(1, &ring, 0);
> if (ret < 0) {
> - ksft_test_result_skip("io_uring_queue_init() failed\n");
> + ksft_test_result_skip("io_uring_queue_init() failed (%s)\n",
> + strerror(errno));
This function is documented to return -errno. I'm not sure if errno is
guaranteed to be left unmodified (not clearly documented in the man
page). So you might just want to use strerror(-ret) here.
Same applies to the other io_uring functions.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists