linux/tools
Jesper Dangaard Brouer efe5f9c0a7 selftests/bpf: make correct use of exit codes in bpf selftests
The selftests depend on using the shell exit code as a mean of
detecting the success or failure of test-binary executed.  The
appropiate output "[PASS]" or "[FAIL]" in generated by
tools/testing/selftests/lib.mk.

Notice that the exit code is masked with 255. Thus, be careful if
using the number of errors as the exit code, as 256 errors would be
seen as a success.

There are two standard defined exit(3) codes:
 /usr/include/stdlib.h
 #define EXIT_FAILURE    1       /* Failing exit status.  */
 #define EXIT_SUCCESS    0       /* Successful exit status.  */

Fix test_verifier.c to not use the negative value of variable
"results", but instead return EXIT_FAILURE.

Fix test_align.c and test_progs.c to actually use exit codes, before
they were always indicating success regardless of results.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-13 13:58:56 -04:00
..
accounting
arch tools/include: Sync kernel ABI headers with tooling headers 2017-05-24 09:00:21 +02:00
build Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-15 15:50:49 -07:00
cgroup
firewire
gpio
hv tools: hv: set hotplug for VF on Suse 2017-06-02 14:16:15 -04:00
iio
include bpf: add bpf_set_hash helper for tc progs 2017-06-10 19:05:47 -04:00
kvm/kvm_stat
laptop
leds
lguest
lib bpf: Test for bpf ID 2017-06-06 15:41:24 -04:00
net
nfsd
objtool
pci
pcmcia
perf perf tools: Put caller above callee in --children mode 2017-05-24 08:41:49 +02:00
power Merge branches 'acpi-button' and 'acpi-tools' 2017-05-22 20:29:06 +02:00
scripts
spi
testing selftests/bpf: make correct use of exit codes in bpf selftests 2017-06-13 13:58:56 -04:00
thermal/tmon
time
usb
virtio tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" 2017-05-09 16:43:24 +03:00
vm
Makefile tools/kvm: fix top level makefile 2017-05-03 16:30:25 +02:00