linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: "David Hildenbrand (Arm)" <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Vlastimil Babka <vbabka@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
	Aishwarya TCV <aishwarya.tcv@arm.com>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: Specify requirement for PROC_MEM_ALWAYS_FORCE=y
Date: Fri, 17 Apr 2026 15:33:32 +0300	[thread overview]
Message-ID: <aeIonE2r89VdTJZt@kernel.org> (raw)
In-Reply-To: <8260f624-7ed8-4766-8f80-0d0d4dbb5cb1@sirena.org.uk>

On Fri, Apr 17, 2026 at 12:24:25PM +0100, Mark Brown wrote:
> On Thu, Apr 16, 2026 at 10:28:29PM +0300, Mike Rapoport wrote:
> 
> > But sure graceful skips are better than failing the entire tests. Would be
> > something like this:
> 
> > @@ -622,10 +621,17 @@ static void test_prot_none(void)
> 
> > +	mem_fd = open("/proc/self/mem", O_RDWR);
> > +	if (mem_fd < 0) {
> > +		ksft_test_result_skip("opening /proc/self/mem failed\n");
> > +		return;
> > +	}
> > +
> 
> The string reported in ksft_test_result_*() is the name of the test, it
> should be the same name as is used for pass or fail.  This is used to
> correlate test results between runs.  The error should be logged with a
> separate print, in this case ksft_perror() is probably a good choice.

This should be probably added to kselftest.h because it's not obvious.
 
> >  {
> > -	mem_fd = open("/proc/self/mem", O_RDWR);
> > -	if (mem_fd < 0)
> > -		ksft_exit_fail_msg("opening /proc/self/mem failed\n");
> 
> Yes, this is a preexisting bug in the test which I see there are more
> instances of :(
 
Do you mean that ksft_exit_fail_msg() should also print the test name and
the actual failure message should be ksft_perror() before?

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2026-04-17 12:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 18:40 Mark Brown
2026-04-16 18:56 ` Mike Rapoport
2026-04-16 19:05 ` David Hildenbrand (Arm)
2026-04-16 19:10   ` Mark Brown
2026-04-16 19:28     ` Mike Rapoport
2026-04-17  2:56       ` Anshuman Khandual
2026-04-17 12:41         ` Mike Rapoport
2026-04-17 13:10           ` Mark Brown
2026-04-17  4:36       ` Dev Jain
2026-04-17 11:24       ` Mark Brown
2026-04-17 12:33         ` Mike Rapoport [this message]
2026-04-17 12:37           ` Mark Brown
2026-04-17  2:57 ` Anshuman Khandual
2026-04-17  4:37 ` Dev Jain

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=aeIonE2r89VdTJZt@kernel.org \
    --to=rppt@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=aishwarya.tcv@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=david@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@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