(t *testing.T)
| 177 | } |
| 178 | |
| 179 | func TestParseLinuxTCPStat4(t *testing.T) { |
| 180 | lip, lport := net.ParseIP("67.218.110.129"), 43436 |
| 181 | rip, rport := net.ParseIP("207.7.148.195"), 80 |
| 182 | |
| 183 | // 816EDA43:A9AC C39407CF:0050 |
| 184 | // 43436 80 |
| 185 | uid, err := uidFromProcReader(lip, lport, rip, rport, strings.NewReader(tcpstat4)) |
| 186 | if err != nil { |
| 187 | t.Error(err) |
| 188 | } |
| 189 | if e, g := 61652, uid; e != g { |
| 190 | t.Errorf("expected uid %d, got %d", e, g) |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | var tcpstat4 = ` sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode |
| 195 | 0: 0100007F:C204 00000000:0000 0A 00000000:00000000 00:00000000 00000000 61652 0 8722922 1 ffff880036b36180 300 0 0 2 -1 |
nothing calls this directly
no test coverage detected