mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 20:16:44 +07:00
selftests/bpf: test_sockmap, join cgroup in selftest mode
In case of selftest mode, temporary cgroup environment is created but
cgroup is not joined. It causes test failures. Fixed by joining the
cgroup
Fixes: 16962b2404
("bpf: sockmap, add selftests")
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
16edddfe3c
commit
035b37ff2c
@ -1344,6 +1344,11 @@ static int __test_suite(char *bpf_file)
|
||||
return cg_fd;
|
||||
}
|
||||
|
||||
if (join_cgroup(CG_PATH)) {
|
||||
fprintf(stderr, "ERROR: failed to join cgroup\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Tests basic commands and APIs with range of iov values */
|
||||
txmsg_start = txmsg_end = 0;
|
||||
err = test_txmsg(cg_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user