linux/tools/testing/selftests
Stanislav Fomichev a8911d6d58 selftests/bpf: fix incorrect users of create_and_get_cgroup
We have some tests that assume create_and_get_cgroup returns -1 on error
which is incorrect (it returns 0 on error). Since fd might be zero in
general case, change create_and_get_cgroup to return -1 on error
and fix the users that assume 0 on error.

Fixes: f269099a7e ("tools/bpf: add a selftest for bpf_get_current_cgroup_id() helper")
Fixes: 7d2c6cfc54 ("bpf: use --cgroup in test_suite if supplied")

v2:
- instead of fixing the uses that assume -1 on error, convert the users
  that assume 0 on error (fd might be zero in general case)

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-01-07 13:15:55 -08:00
..
android
bpf selftests/bpf: fix incorrect users of create_and_get_cgroup 2019-01-07 13:15:55 -08:00
breakpoints
capabilities
cgroup
cpu-hotplug
cpufreq
drivers linux-kselftest-4.21-rc1 2018-12-28 21:27:13 -08:00
efivarfs
exec
filesystems
firmware
ftrace Tracing changes for v4.21: 2018-12-31 11:46:59 -08:00
futex
gpio
ia64
ima
intel_pstate
ipc
ir
kcmp
kmod
kvm kvm: selftests: ucall: fix exit mmio address guessing 2018-12-21 13:58:46 +01:00
lib
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net selftests: net: fix/improve ip_defrag selftest 2019-01-04 13:38:39 -08:00
netfilter
networking/timestamping Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
nsfs
ntb
powerpc selftests/powerpc: Add checks for transactional sigreturn 2018-12-21 14:46:50 +11:00
prctl
proc
pstore
ptp
ptrace
rcutorture
rseq
rtc
seccomp Merge branch 'next-seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-01-02 09:48:13 -08:00
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
timers
uevent
user
vDSO
vm
watchdog
x86
zram
.gitignore
Makefile Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-01-02 09:43:14 -08:00
gen_kselftest_tar.sh
kselftest.h
kselftest_harness.h
kselftest_install.sh
lib.mk