Re: [PATCH v5 5/5] mm: selftests: Add shmem into memory failure test

"David Hildenbrand (Arm)" <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm
Message-ID <[email protected]>
On 8/23/26 21:40, Lisa Wang wrote:
> Add a shmem memory failure selftest to test the shmem memory failure is
> correct after modifying shmem return value.
> 
> Specifically, test the expected behavior under various scenarios
> combining page dirtiness (dirty vs clean) and failure types (hard vs
> soft):
> + Dirty + Hard: Trigger a SIGBUS on injection, and trigger another
>   SIGBUS when reading the page again.
> + Dirty + Soft: No SIGBUS is triggered, and the original value can be
>   read successfully.
> + Clean + Hard: No SIGBUS is triggered on injection, but trigger a
>   SIGBUS when trying to read the page again.
> + Clean + Soft: No SIGBUS is triggered, and the page can be read
>   successfully.
> 
> Acked-by: Miaohe Lin <[email protected]>
> Signed-off-by: Lisa Wang <[email protected]>
> ---
>  tools/testing/selftests/mm/memory-failure.c | 118 +++++++++++++++++++++++++++-
>  1 file changed, 115 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/mm/memory-failure.c b/tools/testing/selftests/mm/memory-failure.c
> index 1a5a32e22cce..5b26f0c44664 100644
> --- a/tools/testing/selftests/mm/memory-failure.c
> +++ 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?



-- 
Cheers,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.