diff options
author | Hou Tao <houtao1@huawei.com> | 2021-10-25 14:40:25 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-11-01 14:10:00 -0700 |
commit | 31122b2f768bde5281037141bb658f117bea102e (patch) | |
tree | d48c79c0279c3a198eb3724d7d56ac9fe7b00ff8 /net/switchdev/switchdev.c | |
parent | c196906d50e360d82ed9aa5596a9d0ce89b7ab78 (diff) |
selftests/bpf: Add test cases for struct_ops prog
Running a BPF_PROG_TYPE_STRUCT_OPS prog for dummy_st_ops::test_N()
through bpf_prog_test_run(). Four test cases are added:
(1) attach dummy_st_ops should fail
(2) function return value of bpf_dummy_ops::test_1() is expected
(3) pointer argument of bpf_dummy_ops::test_1() works as expected
(4) multiple arguments passed to bpf_dummy_ops::test_2() are correct
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20211025064025.2567443-5-houtao1@huawei.com
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions