MCPcopy Create free account
hub / github.com/prometheus/procfs / TestProcStatComm

Function TestProcStatComm

proc_stat_test.go:110–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

108}
109
110func TestProcStatComm(t *testing.T) {
111 s1, err := testProcStat(26231)
112 if err != nil {
113 t.Fatal(err)
114 }
115 if want, have := "vim", s1.Comm; want != have {
116 t.Errorf("want comm %s, have %s", want, have)
117 }
118
119 s2, err := testProcStat(584)
120 if err != nil {
121 t.Fatal(err)
122 }
123 if want, have := "(a b ) ( c d) ", s2.Comm; want != have {
124 t.Errorf("want comm %s, have %s", want, have)
125 }
126}
127
128func TestProcStatVirtualMemory(t *testing.T) {
129 s, err := testProcStat(26231)

Callers

nothing calls this directly

Calls 1

testProcStatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…