(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func TestSysctlStrings(t *testing.T) { |
| 45 | fs := getProcFixtures(t) |
| 46 | |
| 47 | for _, tc := range []struct { |
| 48 | sysctl string |
| 49 | want []string |
| 50 | }{ |
| 51 | {"kernel.seccomp.actions_avail", []string{"kill_process", "kill_thread", "trap", "errno", "trace", "log", "allow"}}, |
| 52 | } { |
| 53 | t.Run(tc.sysctl, func(t *testing.T) { |
| 54 | got, err := fs.SysctlStrings(tc.sysctl) |
| 55 | if err != nil { |
| 56 | t.Fatal(err) |
| 57 | } |
| 58 | if diff := cmp.Diff(tc.want, got); diff != "" { |
| 59 | t.Fatalf("unexpected syscall value(-want +got):\n%s", diff) |
| 60 | } |
| 61 | }) |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | func TestSysctlIntsError(t *testing.T) { |
| 66 | fs := getProcFixtures(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…