Re: [PATCH 21/29] selftests/mm: Add framework for uffd-unit-test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux