mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 12:05:21 +08:00
Move top-level packages into pkg
This commit is contained in:
31
pkg/proc/proc_unix_test.go
Normal file
31
pkg/proc/proc_unix_test.go
Normal file
@ -0,0 +1,31 @@
|
||||
// +build linux darwin
|
||||
|
||||
package proc
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
protest "github.com/derekparker/delve/pkg/proc/test"
|
||||
)
|
||||
|
||||
func TestIssue419(t *testing.T) {
|
||||
// SIGINT directed at the inferior should be passed along not swallowed by delve
|
||||
withTestProcess("issue419", t, func(p *Process, fixture protest.Fixture) {
|
||||
go func() {
|
||||
for {
|
||||
if p.Running() {
|
||||
time.Sleep(2 * time.Second)
|
||||
err := syscall.Kill(p.pid, syscall.SIGINT)
|
||||
assertNoError(err, t, "syscall.Kill")
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
err := p.Continue()
|
||||
if _, exited := err.(ProcessExitedError); !exited {
|
||||
t.Fatalf("Unexpected error after Continue(): %v\n", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user