To ensure only the current test is skipped on permission failure, instead
of terminating the entire test binary.
Signed-off-by: wang lian <lianux.mm@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: David Hildenbrand <david@redhat.com>
---
tools/testing/selftests/mm/guard-regions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/guard-regions.c b/tools/testing/selftests/mm/guard-regions.c
index 4b76e72e7053..b0d42eb04e3a 100644
--- a/tools/testing/selftests/mm/guard-regions.c
+++ b/tools/testing/selftests/mm/guard-regions.c
@@ -575,7 +575,7 @@ TEST_F(guard_regions, process_madvise)
/* OK we don't have permission to do this, skip. */
if (count == -1 && errno == EPERM)
- ksft_exit_skip("No process_madvise() permissions, try running as root.\n");
+ SKIP(return, "No process_madvise() permissions, try running as root.\n");
/* Returns the number of bytes advised. */
ASSERT_EQ(count, 6 * page_size);
--
2.43.0
On 17 Jul 2025, at 9:18, wang lian wrote: > To ensure only the current test is skipped on permission failure, instead > of terminating the entire test binary. > > Signed-off-by: wang lian <lianux.mm@gmail.com> > Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> > Acked-by: David Hildenbrand <david@redhat.com> > --- > tools/testing/selftests/mm/guard-regions.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Zi Yan <ziy@nvidia.com> Best Regards, Yan, Zi
On Thu, Jul 17, 2025 at 09:18:57PM +0800, wang lian wrote: >To ensure only the current test is skipped on permission failure, instead >of terminating the entire test binary. > >Signed-off-by: wang lian <lianux.mm@gmail.com> >Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> >Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> -- Wei Yang Help you, Help me
On Thu, Jul 17, 2025 at 09:18:57PM +0800, wang lian wrote: > To ensure only the current test is skipped on permission failure, instead > of terminating the entire test binary. Reviewed-by: Mark Brown <broonie@kernel.org>
© 2016 - 2025 Red Hat, Inc.