diff options
| author | Kui-Feng Lee <[email protected]> | 2024-02-29 06:45:23 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-02-29 22:23:53 +0000 |
| commit | 0623e73317940d052216fb6eef4efd55a0a7f602 (patch) | |
| tree | 524cfad5f7755ea83210ec355b43fa650219b237 /scripts/bpf_doc.py | |
| parent | bpftool: Add an example for struct_ops map and shadow type. (diff) | |
| download | kernel-0623e73317940d052216fb6eef4efd55a0a7f602.tar.gz kernel-0623e73317940d052216fb6eef4efd55a0a7f602.zip | |
selftests/bpf: Test if shadow types work correctly.
Change the values of fields, including scalar types and function pointers,
and check if the struct_ops map works as expected.
The test changes the field "test_2" of "testmod_1" from the pointer to
test_2() to pointer to test_3() and the field "data" to 13. The function
test_2() and test_3() both compute a new value for "test_2_result", but in
different way. By checking the value of "test_2_result", it ensures the
struct_ops map works as expected with changes through shadow types.
Signed-off-by: Kui-Feng Lee <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions
