Re: [PATCH v6 0/6] selftests/mm: skip several tests when thp is not available
From: Chunyu Hu
Date: Sun Mar 29 2026 - 05:06:39 EST
On Fri, Mar 27, 2026 at 02:24:58PM +0100, David Hildenbrand (Arm) wrote:
> On 3/24/26 17:09, Andrew Morton wrote:
> > On Tue, 24 Mar 2026 09:33:10 +0800 Chunyu Hu <chuhu@xxxxxxxxxx> wrote:
> >
> >> There are several tests requires transprarent hugepages, when run on thp
> >> disabled kernel such as realtime kernel, there will be false negative.
> >> Mark those tests as skip when thp is not available.
> >
> > Thanks, I updated mm.git's mm-unstable branch to this version.
> >
> >> Chagnes in v6:
> >> - patch 3 add reviewed-by from Lorenzo
> >> - patch 4 handle the errno before and after close(), suggested by AI
> >
> > Here's how v6 altered mm.git:
> >
> >
> > tools/testing/selftests/mm/vm_util.c | 12 ++++++++++--
> > 1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > --- a/tools/testing/selftests/mm/vm_util.c~b
> > +++ a/tools/testing/selftests/mm/vm_util.c
> > @@ -785,15 +785,23 @@ int unpoison_memory(unsigned long pfn)
> >
> > void write_file(const char *path, const char *buf, size_t buflen)
> > {
> > - int fd;
> > + int fd, saved_errno;
> > ssize_t numwritten;
>
> Empty line? :)
Good catch. I will add one empty line in the next version. Thanks!
>
> > + if (buflen < 1)
> > + ksft_exit_fail_msg("Incorrect buffer len: %zu\n", buflen);
>
> --
> Cheers,
>
> David
>