selftests/bpf: convert test_cgrp2_attach2 example into kselftest
authorRoman Gushchin <guro@fb.com>
Sat, 25 May 2019 16:37:40 +0000 (09:37 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 28 May 2019 16:30:02 +0000 (09:30 -0700)
commitba0c0cc05dda2c56e23c88e4610ce2ac65ff86ec
tree0cd94982943eb2a36f4b1f645a4357533343896d
parent4bfc0bb2c60e2f4cc8eb60f03cf8dfa72336272a
selftests/bpf: convert test_cgrp2_attach2 example into kselftest

Convert test_cgrp2_attach2 example into a proper test_cgroup_attach
kselftest. It's better because we do run kselftest on a constant
basis, so there are better chances to spot a potential regression.

Also make it slightly less verbose to conform kselftests output style.

Output example:
  $ ./test_cgroup_attach
  #override:PASS
  #multi:PASS
  test_cgroup_attach:PASS

Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/Makefile
samples/bpf/test_cgrp2_attach2.c [deleted file]
tools/testing/selftests/bpf/.gitignore
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_cgroup_attach.c [new file with mode: 0644]