linux_dsm_epyc7002/tools/testing/selftests
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
..
bpf selftests/bpf: make correct use of exit codes in bpf selftests 2017-06-13 13:58:56 -04:00
breakpoints selftests: breakpoints: allow to cross-compile for aarch64/arm64 2017-04-21 11:25:26 -06:00
capabilities
cpu-hotplug
cpufreq selftests: create cpufreq kconfig fragments 2017-04-27 08:42:18 -06:00
drivers/gpu drm/i915: Provide a hook for selftests 2017-02-13 20:45:21 +00:00
efivarfs
exec
filesystems
firmware driver core patches for 4.11-rc1 2017-02-22 11:44:32 -08:00
ftrace selftests/ftrace: Add a testcase for many kprobe events 2017-05-26 22:37:00 -04:00
futex selftests: futex: override clean in lib.mk to fix warnings 2017-04-25 09:47:21 -06:00
gpio selftests: gpio: fix clean target to remove all generated files and dirs 2017-04-25 09:49:50 -06:00
ia64
intel_pstate selftests/intel_pstate: Update makefile to match new style 2017-01-19 10:30:40 -07:00
ipc
kcmp
lib selftests: lib: add config fragment for bitmap, printf and prime numbers tests 2017-04-11 09:37:53 -06:00
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net selftests/net: Fix broken test case in psock_fanout 2017-04-25 11:56:17 -04:00
networking/timestamping
nsfs
ntb
powerpc selftests/powerpc: Fix TM resched DSCR test with some compilers 2017-05-19 19:46:34 +10:00
prctl
pstore
ptp
ptrace
rcutorture torture: Use correct path for Kconfig fragment for duplicates 2017-04-19 09:29:19 -07:00
seccomp
sigaltstack tools/testing/selftests/sigaltstack/sas.c: improve output of sigaltstack testcase 2017-02-27 18:43:45 -08:00
size
splice selftests: splice: override clean in lib.mk to fix warnings 2017-04-27 08:05:04 -06:00
static_keys
sync selftests: sync: override clean in lib.mk to fix warnings 2017-04-27 08:05:14 -06:00
sysctl
timers linux-kselftest-4.12-rc1 2017-05-08 20:43:30 -07:00
user
vDSO
vm linux-kselftest-4.12-rc1 2017-05-08 20:43:30 -07:00
watchdog selftests: watchdog: accept multiple params on command line 2017-05-02 10:48:24 -06:00
x86 linux-kselftest-4.12-rc1 2017-05-08 20:43:30 -07:00
zram
.gitignore selftests: add gpio generated files to .gitignore 2017-04-25 09:49:38 -06:00
gen_kselftest_tar.sh
kselftest_install.sh
kselftest.h
lib.mk selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean 2017-04-25 09:46:45 -06:00
Makefile selftests/Makefile: Add missed PHONY targets 2017-04-21 11:24:58 -06:00