Remove overcomplicated logic of SIGCHLD from TestNsenterDeadPid

It lead to some race which hanged test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2015-03-05 13:52:48 -08:00
parent 88989e66d3
commit 846e522ffc
1 changed files with 1 additions and 9 deletions

View File

@ -5,9 +5,7 @@ import (
"fmt"
"os"
"os/exec"
"os/signal"
"strings"
"syscall"
"testing"
)
@ -67,16 +65,10 @@ func TestNsenterInvalidPid(t *testing.T) {
}
func TestNsenterDeadPid(t *testing.T) {
c := make(chan os.Signal)
signal.Notify(c, syscall.SIGCHLD)
dead_cmd := exec.Command("true")
if err := dead_cmd.Start(); err != nil {
if err := dead_cmd.Run(); err != nil {
t.Fatal(err)
}
defer dead_cmd.Wait()
<-c // dead_cmd is zombie
args := []string{"nsenter-exec"}
cmd := &exec.Cmd{