mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix data race in syscall_test_runner.go
Fixes #1140 PiperOrigin-RevId: 279012793
This commit is contained in:
committed by
gVisor bot
parent
0c424ea731
commit
3552691137
@@ -208,14 +208,15 @@ func runRunsc(tc gtest.TestCase, spec *specs.Spec) error {
|
||||
}
|
||||
log.Warningf("%s: Got signal: %v", name, s)
|
||||
done := make(chan bool)
|
||||
go func() {
|
||||
dArgs := append(args, "-alsologtostderr=true", "debug", "--stacks", id)
|
||||
dArgs := append([]string{}, args...)
|
||||
dArgs = append(dArgs, "-alsologtostderr=true", "debug", "--stacks", id)
|
||||
go func(dArgs []string) {
|
||||
cmd := exec.Command(*runscPath, dArgs...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Run()
|
||||
done <- true
|
||||
}()
|
||||
}(dArgs)
|
||||
|
||||
timeout := time.After(3 * time.Second)
|
||||
select {
|
||||
@@ -225,7 +226,7 @@ func runRunsc(tc gtest.TestCase, spec *specs.Spec) error {
|
||||
}
|
||||
|
||||
log.Warningf("Send SIGTERM to the sandbox process")
|
||||
dArgs := append(args, "debug",
|
||||
dArgs = append(args, "debug",
|
||||
fmt.Sprintf("--signal=%d", syscall.SIGTERM),
|
||||
id)
|
||||
cmd = exec.Command(*runscPath, dArgs...)
|
||||
|
||||
Reference in New Issue
Block a user