Re: [PATCH bpf-next] selftests/bpf: remove logic duplication in test_verifier.c

2019-07-12 Thread Krzesimir Nowak
On Thu, Jul 11, 2019 at 4:43 PM Andrii Nakryiko wrote: > > On Thu, Jul 11, 2019 at 5:13 AM Krzesimir Nowak wrote: > > > > On Thu, Jul 11, 2019 at 3:08 AM Andrii Nakryiko wrote: > > > > > > test_verifier tests can specify single- and multi-runs tests. Intern

Re: [PATCH bpf-next] selftests/bpf: remove logic duplication in test_verifier.c

2019-07-11 Thread Krzesimir Nowak
On Thu, Jul 11, 2019 at 3:08 AM Andrii Nakryiko wrote: > > test_verifier tests can specify single- and multi-runs tests. Internally > logic of handling them is duplicated. Get rid of it by making single run > retval specification to be a first retvals spec. > > Cc: Krzesimir N

Re: [PATCH bpf v1 2/3] selftests/bpf: Print a message when tester could not run a program

2019-05-16 Thread Krzesimir Nowak
On Thu, May 16, 2019 at 5:51 PM Jakub Kicinski wrote: > > On Thu, 16 May 2019 11:29:39 +0200, Krzesimir Nowak wrote: > > > > diff --git a/tools/testing/selftests/bpf/test_verifier.c > > > > b/tools/testing/selftests/bpf/test_verifier.c > > > &g

Re: [PATCH bpf v1 3/3] selftests/bpf: Avoid a clobbering of errno

2019-05-16 Thread Krzesimir Nowak
On Wed, May 15, 2019 at 11:51 PM Jakub Kicinski wrote: > > On Wed, 15 May 2019 15:47:28 +0200, Krzesimir Nowak wrote: > > Save errno right after bpf_prog_test_run returns, so we later check > > the error code actually set by bpf_prog_test_run, not by some libcap > > fun

Re: [PATCH bpf v1 2/3] selftests/bpf: Print a message when tester could not run a program

2019-05-16 Thread Krzesimir Nowak
On Wed, May 15, 2019 at 11:46 PM Jakub Kicinski wrote: > > On Wed, 15 May 2019 15:47:27 +0200, Krzesimir Nowak wrote: > > This prints a message when the error is about program type being not > > supported by the test runner or because of permissions problem. This > > is

[PATCH bpf v1 2/3] selftests/bpf: Print a message when tester could not run a program

2019-05-15 Thread Krzesimir Nowak
;. Signed-off-by: Krzesimir Nowak --- tools/testing/selftests/bpf/test_verifier.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index ccd896b98cac..bf0da03f593b 10

[PATCH bpf v1 3/3] selftests/bpf: Avoid a clobbering of errno

2019-05-15 Thread Krzesimir Nowak
Save errno right after bpf_prog_test_run returns, so we later check the error code actually set by bpf_prog_test_run, not by some libcap function. Cc: Jakub Kicinski Fixes: 5a8d5209ac022 ("selftests: bpf: add trivial JSET tests") Signed-off-by: Krzesimir Nowak --- tools/testing/sel

[PATCH bpf v1 1/3] selftests/bpf: Test correctness of narrow 32bit read on 64bit field

2019-05-15 Thread Krzesimir Nowak
d-off-by: Krzesimir Nowak --- tools/testing/selftests/bpf/verifier/var_off.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/bpf/verifier/var_off.c b/tools/testing/selftests/bpf/verifier/var_off.c index 8504ac937809..2668819dcc85 100644 --- a/tools/te

[PATCH bpf v1 0/3] Test the 32bit narrow reads

2019-05-15 Thread Krzesimir Nowak
east and most significant words) Did not run the program (not supported) OK Summary: 1 PASSED, 0 SKIPPED, 0 FAILED So it looks like I need to pick a different approach. Krzesimir Nowak (3): selftests/bpf: Test correctness of narrow 32bit read on 64bit field selftests/bpf: Print a message wh