selftests/bpf: Adapt cgroup effective query uapi change
authorPu Lehui <pulehui@huawei.com>
Wed, 21 Sep 2022 10:46:04 +0000 (10:46 +0000)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 21 Sep 2022 17:57:13 +0000 (10:57 -0700)
commitd2aa993b7d9de6deeb1df6c9a6b9b6193c337cc6
treee8574ca67a8330dd337d3144d940f6b868e593b0
parentbdcee1b0b0834d031c76a12209840afe949b048a
selftests/bpf: Adapt cgroup effective query uapi change

The attach flags is meaningless for effective query and
its value will always be set as 0 during effective query.
Root cg's effective progs is always its attached progs,
so we use non-effective query to get its progs count and
attach flags. And we don't need the remain attach flags
check.

Fixes: b79c9fc9551b ("bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20220921104604.2340580-4-pulehui@huaweicloud.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/cgroup_link.c