[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZDW+byWzRP2WEbd3@x1n>
Date: Tue, 11 Apr 2023 16:09:19 -0400
From: Peter Xu <peterx@...hat.com>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Mike Kravetz <mike.kravetz@...cle.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Leonardo Bras Soares Passos <lsoaresp@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH 21/29] selftests/mm: Add framework for uffd-unit-test
On Tue, Apr 11, 2023 at 02:09:51PM +0300, Mike Rapoport wrote:
> > @@ -119,7 +220,31 @@ int main(int argc, char *argv[])
> > printf("Userfaultfd not supported or unprivileged, skip all tests\n");
> > exit(KSFT_SKIP);
> > }
> > +
> > + for (i = 0; i < n_tests; i++) {
> > + test = &uffd_tests[i];
> > + for (j = 0; j < n_mems; j++) {
> > + mem_type = &mem_types[j];
> > + if (!(test->mem_targets & mem_type->mem_flag))
> > + continue;
> > + snprintf(test_name, sizeof(test_name),
> > + "%s on %s", test->name, mem_type->name);
> > +
> > + uffd_test_start(test_name);
> > + if (!uffd_feature_supported(test)) {
> > + uffd_test_skip("feature missing");
> > + continue;
> > + }
> > + if (uffd_setup_environment(test, mem_type)) {
> > + uffd_test_skip("memory allocation failed");
>
> Maybe uffd_test_skip("environment setup failed")?
Sure.
Side note: the line will be changed after "selftests/mm: Allow uffd test to
skip properly with no privilege" to contain an errmsg pointer instead, so
it won't affect the last result after series applied.
Thanks,
--
Peter Xu
Powered by blists - more mailing lists