Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1634)

Side by Side Diff: src/pkg/os/os_test.go

Issue 105140047: code review 105140047: os: disable TestGetppid on plan9 (Closed)
Patch Set: diff -r 927f0508bc93 https://go.googlecode.com/hg/ Created 9 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package os_test 5 package os_test
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "errors" 9 "errors"
10 "flag" 10 "flag"
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 func TestKillStartProcess(t *testing.T) { 1287 func TestKillStartProcess(t *testing.T) {
1288 testKillProcess(t, func(p *Process) { 1288 testKillProcess(t, func(p *Process) {
1289 err := p.Kill() 1289 err := p.Kill()
1290 if err != nil { 1290 if err != nil {
1291 t.Fatalf("Failed to kill test process: %v", err) 1291 t.Fatalf("Failed to kill test process: %v", err)
1292 } 1292 }
1293 }) 1293 })
1294 } 1294 }
1295 1295
1296 func TestGetppid(t *testing.T) { 1296 func TestGetppid(t *testing.T) {
1297 » if runtime.GOOS == "nacl" { 1297 » switch runtime.GOOS {
1298 » case "nacl":
1298 t.Skip("skipping on nacl") 1299 t.Skip("skipping on nacl")
1300 case "plan9":
1301 // TODO: golang.org/issue/8206
1302 t.Skipf("skipping test on plan9; see issue 8206")
1299 } 1303 }
1300 1304
1301 if Getenv("GO_WANT_HELPER_PROCESS") == "1" { 1305 if Getenv("GO_WANT_HELPER_PROCESS") == "1" {
1302 fmt.Print(Getppid()) 1306 fmt.Print(Getppid())
1303 Exit(0) 1307 Exit(0)
1304 } 1308 }
1305 1309
1306 cmd := osexec.Command(Args[0], "-test.run=TestGetppid") 1310 cmd := osexec.Command(Args[0], "-test.run=TestGetppid")
1307 cmd.Env = append(Environ(), "GO_WANT_HELPER_PROCESS=1") 1311 cmd.Env = append(Environ(), "GO_WANT_HELPER_PROCESS=1")
1308 1312
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 // Test that all File methods give ErrInvalid if the receiver is nil. 1360 // Test that all File methods give ErrInvalid if the receiver is nil.
1357 func TestNilFileMethods(t *testing.T) { 1361 func TestNilFileMethods(t *testing.T) {
1358 for _, tt := range nilFileMethodTests { 1362 for _, tt := range nilFileMethodTests {
1359 var file *File 1363 var file *File
1360 got := tt.f(file) 1364 got := tt.f(file)
1361 if got != ErrInvalid { 1365 if got != ErrInvalid {
1362 t.Errorf("%v should fail when f is nil; got %v", tt.name , got) 1366 t.Errorf("%v should fail when f is nil; got %v", tt.name , got)
1363 } 1367 }
1364 } 1368 }
1365 } 1369 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b