diff options
Diffstat (limited to 'libgo/go/syscall/syscall_test.go')
-rw-r--r-- | libgo/go/syscall/syscall_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libgo/go/syscall/syscall_test.go b/libgo/go/syscall/syscall_test.go index 0a0b8b7a26d..c3fffda2df5 100644 --- a/libgo/go/syscall/syscall_test.go +++ b/libgo/go/syscall/syscall_test.go @@ -8,6 +8,7 @@ import ( "fmt" "internal/testenv" "os" + "runtime" "syscall" "testing" ) @@ -59,3 +60,16 @@ func TestExecErrPermutedFds(t *testing.T) { t.Fatalf("StartProcess of invalid program returned err = nil") } } + +func TestGettimeofday(t *testing.T) { + if runtime.GOOS == "nacl" { + t.Skip("not implemented on nacl") + } + tv := &syscall.Timeval{} + if err := syscall.Gettimeofday(tv); err != nil { + t.Fatal(err) + } + if tv.Sec == 0 && tv.Usec == 0 { + t.Fatal("Sec and Usec both zero") + } +} |