Re: [PATCH v5 5/5] mm: selftests: Add shmem into memory failure test
From: Lisa Wang
Date: Wed Aug 26 2026 - 13:57:57 EST
On Mon, Aug 24, 2026 at 03:00:47PM +0200, David Hildenbrand (Arm) wrote:
> > +++ b/tools/testing/selftests/mm/memory-failure.c
> > @@ -20,6 +20,10 @@
> >
> > #include "vm_util.h"
> >
> > +#ifndef fallthrough
> > +# define fallthrough __attribute__((__fallthrough__))
> > +#endif
>
> This doesn't belong into this test.
>
> rseq/rseq.c selftest already uses it.
>
> I think tools/testing/include/ already provides it.
>
> Maybe
>
> #include <linux/compiler.h>
>
> does the trick?
Hi David,
Thank you for replying.
Would it be better to change it to /* FALLTHROUGH */
like the rest of the mm selftests?
If we prefer to include <linux/compiler.h>, we can
certainly do that, but we would also need to update
the Makefile and fix a redefinition in pkey-helpers.h.
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -37,7 +37,7 @@ endif
# LDLIBS.
MAKEFLAGS += --no-builtin-rules
-CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES)
+CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES) -I$(top_srcdir)/tools/include
CFLAGS += -Wunreachable-code
LDLIBS = -lrt -lpthread -lm
--- a/tools/testing/selftests/mm/pkey-helpers.h
+++ b/tools/testing/selftests/mm/pkey-helpers.h
@@ -22,7 +22,7 @@
typedef __u8 u8;
typedef __u16 u16;
typedef __u32 u32;
-typedef __u64 u64;
+// typedef __u64 u64;
Lisa