Commit 34da872
selftests/bpf: Test bpf_sk_storage_get in tcp iterators
This extends the existing bpf_sk_storage_get test where a socket is created and tagged with its creator's pid by a task_file iterator. A TCP iterator is now also used at the end of the test to negate the values already stored in the local storage. The test therefore expects -getpid() to be stored in the local storage. Signed-off-by: Florent Revest <revest@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20201204113609.1850150-6-revest@google.com1 parent bd9b327 commit 34da872
File tree
2 files changed
+34
-2
lines changed- tools/testing/selftests/bpf
- prog_tests
- progs
2 files changed
+34
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
| 981 | + | |
| 982 | + | |
981 | 983 | | |
982 | 984 | | |
983 | 985 | | |
| |||
994 | 996 | | |
995 | 997 | | |
996 | 998 | | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
997 | 1003 | | |
998 | 1004 | | |
999 | 1005 | | |
| |||
1003 | 1009 | | |
1004 | 1010 | | |
1005 | 1011 | | |
1006 | | - | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1007 | 1021 | | |
1008 | | - | |
| 1022 | + | |
1009 | 1023 | | |
1010 | 1024 | | |
1011 | 1025 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments