selftest/bpf: Fix profiler test using CO-RE relocation for enums
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 22 Oct 2020 20:27:38 +0000 (13:27 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 26 Oct 2020 15:33:12 +0000 (16:33 +0100)
commit472547778de24e2764ab325268dd5b77e6923939
tree9fc159915a88f18e7f97f36ebf2969953edde016
parent435ccfa894e35e3d4a1799e6ac030e48a7b69ef5
selftest/bpf: Fix profiler test using CO-RE relocation for enums

Instead of hard-coding invalid pids_cgrp_id, use Kconfig to detect the
presence of that enum value and CO-RE to capture its actual value in the
hosts's kernel.

Fixes: 03d4d13fab3f ("selftests/bpf: Add profiler test")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201022202739.3667367-1-andrii@kernel.org
tools/testing/selftests/bpf/progs/profiler.inc.h