Commit a0dbf6d
selftests/bpf: attach struct_ops maps before test prog runs
In test_loader based tests to bpf_map__attach_struct_ops()
before call to bpf_prog_test_run_opts() in order to trigger
bpf_struct_ops->reg() callbacks on kernel side.
This allows to use __retval macro for struct_ops tests.
Signed-off-by: Eduard Zingerman <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>1 parent 866d571 commit a0dbf6d
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
| 893 | + | |
893 | 894 | | |
894 | 895 | | |
895 | 896 | | |
896 | 897 | | |
897 | 898 | | |
| 899 | + | |
898 | 900 | | |
899 | 901 | | |
900 | 902 | | |
| |||
999 | 1001 | | |
1000 | 1002 | | |
1001 | 1003 | | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1002 | 1024 | | |
1003 | 1025 | | |
1004 | 1026 | | |
| |||
1013 | 1035 | | |
1014 | 1036 | | |
1015 | 1037 | | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1016 | 1041 | | |
1017 | 1042 | | |
1018 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
1019 | 1046 | | |
1020 | 1047 | | |
1021 | 1048 | | |
| |||
0 commit comments