Commit ddc3381e authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net: skip ICMP test on Windows too unless uid 0

This test fails for me on Windows 7 64-bit non-Admin.

R=golang-dev, rsc, krautz
CC=golang-dev
https://golang.org/cl/5276048
parent ec10d677
...@@ -11,7 +11,6 @@ import ( ...@@ -11,7 +11,6 @@ import (
"bytes" "bytes"
"flag" "flag"
"os" "os"
"runtime"
"testing" "testing"
) )
...@@ -65,7 +64,7 @@ var dsthost = flag.String("dsthost", "127.0.0.1", "Destination for the ICMP ECHO ...@@ -65,7 +64,7 @@ var dsthost = flag.String("dsthost", "127.0.0.1", "Destination for the ICMP ECHO
// test (raw) IP socket using ICMP // test (raw) IP socket using ICMP
func TestICMP(t *testing.T) { func TestICMP(t *testing.T) {
if runtime.GOOS != "windows" && os.Getuid() != 0 { if os.Getuid() != 0 {
t.Logf("test disabled; must be root") t.Logf("test disabled; must be root")
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment