(t *testing.T)
| 28 | ) |
| 29 | |
| 30 | func TestAllThreads(t *testing.T) { |
| 31 | fixFS := getProcFixtures(t) |
| 32 | threads, err := fixFS.AllThreads(testPID) |
| 33 | if err != nil { |
| 34 | t.Fatal(err) |
| 35 | } |
| 36 | sort.Sort(threads) |
| 37 | for i, tid := range testTIDS { |
| 38 | if diff := cmp.Diff(tid, threads[i].PID); diff != "" { |
| 39 | t.Fatalf("unexpected diff (-want +got):\n%s", diff) |
| 40 | } |
| 41 | wantFS := fixFS.proc.Path(strconv.Itoa(testPID), "task") |
| 42 | haveFS := string(threads[i].fs.proc) |
| 43 | if diff := cmp.Diff(wantFS, haveFS); diff != "" { |
| 44 | t.Fatalf("unexpected diff (-want +got):\n%s", diff) |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | func TestThreadStat(t *testing.T) { |
| 50 | // Pull process and thread stats. |
nothing calls this directly
no test coverage detected
searching dependent graphs…