]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf/test_progs: do not check errno == 0
authorMauricio Vasquez B <mauricio.vasquez@polito.it>
Mon, 3 Sep 2018 17:01:59 +0000 (19:01 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 7 Sep 2018 05:34:08 +0000 (22:34 -0700)
commit0044ec10bc68a8d0be4eface31d89e591b079b2c
tree9ad9a009961dc85c1ac826f34f04b3a729dd2d1e
parentb1db4d2e55d8017d5b5355cf151a8d2bf6d4ecc9
selftests/bpf/test_progs: do not check errno == 0

The errno man page states: "The value in errno is significant only when
the return value of the call indicated an error..." then it is not correct
to check it, it could be different than zero even if the function
succeeded.

It causes some false positives if errno is set by a previous function.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c