Skip to content

Commit

Permalink
pkg/syscallfilter: remove test obsoleted by go 1.19
Browse files Browse the repository at this point in the history
The test for a double wait is no longer needed
as of the fix called
os/exec: refactor goroutine communication in Wait
4e79f06

With go 1.19 and later, it just hangs. So remove it.

Signed-off-by: Ronald G. Minnich <[email protected]>
  • Loading branch information
rminnichcodeu authored and RiSKeD committed Oct 11, 2022
1 parent 65a21bd commit dcbb18f
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions pkg/syscallfilter/syscallfilter_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,34 +87,6 @@ func TestNoActions(t *testing.T) {
}
}

func TestNoActionsDoubleWait(t *testing.T) {
if traced() {
t.Skipf("Skipping, we're being traced already")
}

c := Command("echo", "hi")
var stdout, stderr bytes.Buffer
c.Stdout, c.Stderr = &stdout, &stderr

if err := c.Run(); err != nil {
t.Fatalf(`%v.Run(), "echo", "hi"): %v != nil`, c, err)
}

// Through one path or another, c.Wait() should have been called.
// If we get no error here, that is a problem.
if err := c.Wait(); err == nil {
t.Errorf("c.Wait(): got nil, want an error")
}

t.Logf("stdout: %q, stderr: %q", stdout.String(), stderr.String())
if stdout.String() != "hi\n" {
t.Errorf("stdout: string is %q, not %q", stdout.String(), "hi\n")
}
if len(stderr.String()) != 0 {
t.Errorf("stderr.String: got %q, want %q", stderr.String(), "")
}
}

func TestNoErrorExit(t *testing.T) {
if traced() {
t.Skipf("Skipping, we're being traced already")
Expand Down

0 comments on commit dcbb18f

Please sign in to comment.