Hi Sarthak,
On Wed, Apr 29, 2026 at 06:43:53PM +0530, Sarthak Sharma wrote:
> On 4/29/26 2:12 AM, Mike Rapoport wrote:
> > +
> > + ksft_print_header();
> > + ksft_set_plan(uffd_count_tests(n_tests, n_mems, test_filter));
> > +
> > + if (!test_filter) {
> > has_uffd = test_uffd_api(false);
> > has_uffd |= test_uffd_api(true);
> >
> > - if (!has_uffd) {
> > - printf("Userfaultfd not supported or unprivileged, skip
> > all tests\n");
> > - exit(KSFT_SKIP);
> > - }
> > + if (!has_uffd)
> > + ksft_exit_skip("Userfaultfd not supported or
> > unprivileged\n");
>
> If has_uffd is 0, two test outputs from test_uffd_api() are being
> printed and the third output is from the ksft_exit_skip(). Since we have
> declared the ksft plan before this, we are getting the following
> diagnostic line:
>
> # Planned tests != run tests (67 != 3)
>
> If we remove this if (!has_uffd) check, still all the tests are
> individually being skipped with a "feature missing" message and the
> planned tests are being equal to the run tests. So do we really need
> this check or can this be skipped?
Apparently not :)
--
Sincerely yours,
Mike.