diff --git a/integration/dhcpv4/dhcpv4_test.go b/integration/dhcpv4/dhcpv4_test.go index fd1ce0d..dace22d 100644 --- a/integration/dhcpv4/dhcpv4_test.go +++ b/integration/dhcpv4/dhcpv4_test.go @@ -32,8 +32,10 @@ import ( func TestDHCPv4(t *testing.T) { const ns = "ns0" // name of the network namespace to use for this test - if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil { - t.Fatalf("ip netns add %s: %v", ns, err) + add := exec.Command("ip", "netns", "add", ns) + add.Stderr = os.Stderr + if err := add.Run(); err != nil { + t.Fatalf("%v: %v", add.Args, err) } defer exec.Command("ip", "netns", "delete", ns).Run() diff --git a/integration/dhcpv6/dhcpv6_test.go b/integration/dhcpv6/dhcpv6_test.go index 940f05c..0c97b16 100644 --- a/integration/dhcpv6/dhcpv6_test.go +++ b/integration/dhcpv6/dhcpv6_test.go @@ -32,8 +32,10 @@ var v6AddrRe = regexp.MustCompile(`2001:db8::[^ ]+`) func TestDHCPv6(t *testing.T) { const ns = "ns1" // name of the network namespace to use for this test - if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil { - t.Fatalf("ip netns add %s: %v", ns, err) + add := exec.Command("ip", "netns", "add", ns) + add.Stderr = os.Stderr + if err := add.Run(); err != nil { + t.Fatalf("%v: %v", add.Args, err) } defer exec.Command("ip", "netns", "delete", ns).Run() diff --git a/integration/netconfig/netconfig_test.go b/integration/netconfig/netconfig_test.go index d7ae4b1..973886d 100644 --- a/integration/netconfig/netconfig_test.go +++ b/integration/netconfig/netconfig_test.go @@ -153,8 +153,10 @@ func TestNetconfig(t *testing.T) { } const ns = "ns3" // name of the network namespace to use for this test - if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil { - t.Fatalf("ip netns add %s: %v", ns, err) + add := exec.Command("ip", "netns", "add", ns) + add.Stderr = os.Stderr + if err := add.Run(); err != nil { + t.Fatalf("%v: %v", add.Args, err) } defer exec.Command("ip", "netns", "delete", ns).Run() diff --git a/integration/radvd/radvd_test.go b/integration/radvd/radvd_test.go index beae733..f027fdf 100644 --- a/integration/radvd/radvd_test.go +++ b/integration/radvd/radvd_test.go @@ -29,8 +29,10 @@ import ( func TestRouterAdvertisement(t *testing.T) { const ns = "ns2" // name of the network namespace to use for this test - if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil { - t.Fatalf("ip netns add %s: %v", ns, err) + add := exec.Command("ip", "netns", "add", ns) + add.Stderr = os.Stderr + if err := add.Run(); err != nil { + t.Fatalf("%v: %v", add.Args, err) } defer exec.Command("ip", "netns", "delete", ns).Run()