From: Mark Brown <broonie@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test
Date: Tue, 3 Jun 2025 14:21:21 +0100 [thread overview]
Message-ID: <9961082f-848d-43d3-b97d-3df675ca4415@sirena.org.uk> (raw)
In-Reply-To: <c43347ce-433b-498e-bfd7-f09b8e781197@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]
On Tue, Jun 03, 2025 at 02:51:45PM +0200, David Hildenbrand wrote:
> On 27.05.25 18:04, Mark Brown wrote:
> > ret = mprotect(mem, size, PROT_READ);
> > - ret |= mprotect(mem, size, PROT_READ|PROT_WRITE);
> > if (ret) {
> Not sure if that change is really required: if the second mprotect succeeds,
> errno should not be updated. At least if my memory is correct :)
> Same applies to similar cases below.
I thought about checking to see if that was guaranteed to be the case,
then I thought that if that wasn't clear to me right now without
checking it probably also wasn't going to be obvious to future readers
so it was better to just write something clear. Previously we didn't
report errno so it didn't matter.
> > } else {
> > - ksft_test_result_fail("Leak from parent into child\n");
> Same here and in other cases below (I probably didn't catch all).
> We should log that somehow to indicate what exactly is going wrong, likely
> using ksft_print_msg().
Can you send a patch with the logging that you think would be clear
please? I dropped these because they just seemed to be reporting the
overall point of the test, unlike the cases where we ran into some error
during the setup and didn't actually manage to perform the test we were
trying to do. Perhaps the tests should be renamed.
> > tmp = malloc(size);
> > if (!tmp) {
> > - ksft_test_result_fail("malloc() failed\n");
> > + ksft_print_msg("malloc() failed\n");
> perror?
malloc() can only set one errno.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-06-03 13:21 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 16:04 [PATCH v2 0/4] selftests/mm: cow and gup_longterm cleanups Mark Brown
2025-05-27 16:04 ` [PATCH v2 1/4] selftests/mm: Use standard ksft_finished() in cow and gup_longterm Mark Brown
2025-05-27 16:04 ` [PATCH v2 2/4] selftests/mm: Add helper for logging test start and results Mark Brown
2025-06-03 12:37 ` David Hildenbrand
2025-06-03 18:27 ` Mark Brown
2025-06-03 20:18 ` David Hildenbrand
2025-05-27 16:04 ` [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test Mark Brown
2025-06-03 12:51 ` David Hildenbrand
2025-06-03 13:21 ` Mark Brown [this message]
2025-06-03 14:15 ` David Hildenbrand
2025-06-03 14:58 ` Mark Brown
2025-06-03 15:06 ` David Hildenbrand
2025-06-03 15:22 ` Mark Brown
2025-06-03 16:57 ` David Hildenbrand
2025-06-03 17:48 ` Mark Brown
2025-06-03 17:55 ` Mark Brown
2025-06-03 20:21 ` David Hildenbrand
2025-05-27 16:04 ` [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm Mark Brown
2025-06-03 12:36 ` David Hildenbrand
2025-06-03 13:05 ` Mark Brown
2025-06-05 16:00 ` Lorenzo Stoakes
2025-06-05 16:15 ` Mark Brown
2025-06-05 16:26 ` Lorenzo Stoakes
2025-06-05 16:42 ` Mark Brown
2025-06-05 16:55 ` David Hildenbrand
2025-06-05 17:19 ` Mark Brown
2025-06-05 17:34 ` David Hildenbrand
2025-06-05 18:24 ` Mark Brown
2025-06-05 17:09 ` Lorenzo Stoakes
2025-06-05 17:38 ` Mark Brown
2025-06-05 17:47 ` Lorenzo Stoakes
2025-06-05 18:29 ` Mark Brown
2025-06-05 18:35 ` Lorenzo Stoakes
2025-06-05 16:48 ` David Hildenbrand
2025-06-05 20:32 ` Andrew Morton
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=9961082f-848d-43d3-b97d-3df675ca4415@sirena.org.uk \
--to=broonie@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.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