feat: capture pcap file with PID/ProcName/bundleID

This commit is contained in:
debugtalk
2022-12-22 00:37:02 +08:00
parent 2c1f98b1ef
commit 22a300d9b3
12 changed files with 243 additions and 38 deletions
-19
View File
@@ -159,22 +159,3 @@ func TestPerfAll(t *testing.T) {
}
}
}
func TestPcap(t *testing.T) {
setupLockdownSrv(t)
data, err := dev.PcapStart()
if err != nil {
t.Fatal(err)
}
timer := time.NewTimer(time.Duration(time.Second * 10))
for {
select {
case <-timer.C:
dev.PcapStop()
return
case d := <-data:
fmt.Println(string(d))
}
}
}