aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/os/exec/exec_test.go
AgeCommit message (Collapse)Author
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
2014-05-20build: make nacl passRuss Cox
Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes #7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://golang.org/cl/100590044
2014-04-22os/exec: deflake a test on LinuxBrad Fitzpatrick
Work around buggy(?) Linux /proc filesystem. Fixes #7808 LGTM=iant R=golang-codereviews, iant CC=adg, golang-codereviews https://golang.org/cl/90400044
2014-04-15os/exec: make TestPipeLookPathLeak more verbose when it failsBrad Fitzpatrick
Trying to understand the linux-386-387 failures: http://build.golang.org/log/78a91da173c11e986b4e623527c2d0b746f4e814 Also modernize the closeOnce code with a method value, while I was looking. LGTM=adg R=golang-codereviews, adg CC=golang-codereviews, iant https://golang.org/cl/87950044
2014-04-14os/exec: quiet distracting log output during testBrad Fitzpatrick
TLS handshake failures didn't use to log, but do in Go 1.3. Shut it up so the actual failure can be seen in e.g. http://build.golang.org/log/ede7e12362a941d93bf1fe21db9208a3e298029e LGTM=adg R=adg CC=golang-codereviews https://golang.org/cl/87870043
2014-04-04os/exec: always try appropriate command extensions during Cmd.Start on windowsAlex Brainman
Update #7362 Fixes #7377 Fixes #7570 LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://golang.org/cl/83020043
2014-02-03os/exec: fix Command with relative pathsBrad Fitzpatrick
Command was (and is) documented like: "If name contains no path separators, Command uses LookPath to resolve the path to a complete name if possible. Otherwise it uses name directly." But that wasn't true. It always did LookPath, and then set a sticky error that the user couldn't unset. And then if cmd.Dir was changed, Start would still fail due to the earlier sticky error being set. This keeps LookPath in the same place as before (so no user visible changes in cmd.Path after Command), but only does it when the documentation says it will happen. Also, clarify the docs about a relative Dir path. No change in any existing behavior, except using Command is now possible with relative paths. Previously it only worked if you built the *Cmd by hand. Fixes #7228 LGTM=iant R=iant CC=adg, golang-codereviews https://golang.org/cl/59580044
2014-01-13os/exec: disable fd check in TestHelperProcess on Plan 9David du Colombier
On Plan 9, we can observe the following open file descriptors: 0 r c 0 (000000000000000a 0 00) 0 0 /dev/null 1 rw | 0 (0000000001df6742 0 00) 65536 54 #|/data1 2 rw | 0 (0000000001df6782 0 00) 65536 0 #|/data1 3 rw M 1956 (0000000000d66dd2 0 00) 8192 12 /tmp/333163398 4 r c 0 (0000000000000001 0 00) 0 528 /dev/bintime 5 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 6 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 7 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 8 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 9 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 10 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 11 r c 0 (000000000000000f 0 00) 0 32 /dev/random 12 r M 1956 (0000000000d66dd1 854 00) 8192 0 /tmp/go-build843954301/os/exec/_test/exec.test 13 r c 0 (000000000000000a 0 00) 0 0 /dev/null 14 rw | 0 (0000000001df6801 0 00) 65536 0 #|/data 15 rw | 0 (0000000001df6802 0 00) 65536 1275 #|/data1 R=rsc, bradfitz, aram CC=golang-codereviews https://golang.org/cl/51420044
2014-01-10os, os/exec, os/user: add support for GOOS=solarisAram Hăvărneanu
R=golang-codereviews, dave, minux.ma, gobot, jsing CC=golang-codereviews https://golang.org/cl/36020043
2013-12-18crypto/x509: add non-cgo darwin system anchor certsJosh Bleecher Snyder
The set of certs fetched via exec'ing `security` is not quite identical to the certs fetched via the cgo call. The cgo fetch includes any trusted root certs that the user may have added; exec does not. The exec fetch includes an Apple-specific root cert; the cgo fetch does not. Other than that, they appear to be the same. Unfortunately, os/exec depends on crypto/x509, via net/http. Break the circular dependency by moving the exec tests to their own package. This will not work in iOS; we'll cross that bridge when we get to it. R=golang-dev, minux.ma, agl CC=golang-dev https://golang.org/cl/22020045
2013-08-29os/exec: return idempotent Closer from StdinPipeAndrew Gerrand
Before this fix, it was always an error to use the Close method on the io.WriteCloser obtained from Cmd.StdinPipe, as it would race with the Close performed by Cmd.Wait. Fixes #6270. R=golang-dev, r, remyoudompheng, bradfitz, dsymonds CC=golang-dev https://golang.org/cl/13329043
2013-08-23os/exec: remove flaky TestExtraFilesFDShuffle testCarl Shapiro
Update #5780 R=golang-dev, cshapiro, dave, bradfitz CC=golang-dev https://golang.org/cl/12869049
2013-08-24os: dragonfly supportJoel Sing
Make the os package build and work on dragonfly. R=bradfitz CC=golang-dev https://golang.org/cl/13183044
2013-06-18os/exec: make exec_test.go:TestExtraFilesFDShuffle portable.Cosmos Nicolaou
R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/9103045
2013-05-28os/exec: fix test hangDmitriy Vyukov
Currently the test closes random files descriptors, which leads to hang (in particular if netpoll fd is closed). Try to open only fd 3, since the parent process expects it to be fd 3 anyway. Fixes #5571. R=golang-dev, r CC=golang-dev https://golang.org/cl/9778048
2013-04-30os/exec: disable TestExtraFilesFDShuffleRob Pike
It's too hard to make portable just now. R=golang-dev, iant CC=golang-dev https://golang.org/cl/9057043
2013-04-30syscall: fix a bug in the shuffling of file descriptors in StartProcess on ↵Cosmos Nicolaou
Linux. R=iant, iant, r, bradfitz CC=golang-dev https://golang.org/cl/8334044
2013-03-30os/exec, syscall: fix tests to pass when GOGCTRACE=1 is setAlbert Strasheim
R=golang-dev, bradfitz, minux.ma CC=golang-dev https://golang.org/cl/8193043
2013-03-18os/exec: fix fd leak with Std*Pipe + LookPathBrad Fitzpatrick
If LookPath in Command fails, sets a sticky error, and then StdinPipe, StdoutPipe, or StderrPipe were called, those pipe fds were never cleaned up. Fixes #5071 R=golang-dev, rogpeppe CC=golang-dev https://golang.org/cl/7799046
2013-02-26os/exec: Pass tests on Plan 9Akshat Kumar
Adjust the exit status string for Plan 9. Upon allocating >100 file descriptors, Plan 9 raises a warning. Moreover, the Go runtime for 32-bit version of Plan 9 keeps /dev/bintime open for its implementation of runtime.nanotime(). This change accounts for these things in TestExtraFiles. R=rsc, rminnich, ality, bradfitz CC=golang-dev https://golang.org/cl/7363056
2013-01-27all: make tests able to run multiple times.Rémy Oudompheng
It is now possible to run "go test -cpu=1,2,4 std" successfully. Fixes #3185. R=golang-dev, dave, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/7196052
2013-01-24all: use t.Skip{,f}Dave Cheney
Replace various t.Log{,f} ; return checks with t.Skip{,f}. R=golang-dev, n13m3y3r, bradfitz, adg, mikioh.mikioh CC=golang-dev https://golang.org/cl/7193044
2012-09-04net: fix {FileConn, FileListener, FilePacketConn} fd leak to child process.Sébastien Paolacci
All of them call `newFileFD' which must properly restore close-on-exec on duplicated fds. R=golang-dev, bradfitz, mikioh.mikioh CC=golang-dev https://golang.org/cl/6445081
2012-08-16os/exec: disable additional file descriptor test on netbsdJoel Sing
This currently fails on NetBSD due to the cloned file descriptors that result from opening /dev/urandom. Disable the additional checking until this is investigated and properly fixed. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/6443129
2012-08-06net: fix TCPListener file leak to child processesBrad Fitzpatrick
Hold ForkLock during dup of fd + cloexec in the net pkg, per the locking policy documented in syscall/exec_unix.go. R=golang-dev, dsymonds, adg CC=golang-dev https://golang.org/cl/6457080
2012-02-11os,syscall: fix windows buildBrad Fitzpatrick
make syscall.ProcAttr.Files be []uintptr all.bash passes on Linux. things seem to compile on GOOS={darwin,windows} R=golang-dev, mattn.jp, alex.brainman, rsc CC=golang-dev https://golang.org/cl/5653055
2012-02-10os: delete Exec, NewFile takes uintptr, rename ShellExpand, doc fixesBrad Fitzpatrick
Delete O_NDELAY, O_NONBLOCK, O_NOCTTY, O_ASYNC. Clean up some docs. Rename ShellExpand -> ExpandEnv. Make NewFile take a uintptr; change File.Fd to return one. (for API compatibility between Unix and Windows) Fixes #2947 R=golang-dev, r CC=golang-dev https://golang.org/cl/5655045
2012-02-01os/exec: make sure file is not closed early in leaked fd testIan Lance Taylor
Without this change, fd3 can be collected by the garbage collector and finalized, which causes the file descriptor to be closed, which causes the call to os.Open to return 3 rather than the expected descriptor number. R=golang-dev, gri, bradfitz, bradfitz, iant CC=golang-dev https://golang.org/cl/5607056
2012-01-31os/exec: TestExtraFiles - close any leaked file descriptorsJoel Sing
Ensure that file descriptors have not already been leaked into our environment - close any that are open at the start of the TestExtraFiles test. Also use the appropriate command for listing open files. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5574062
2011-12-21exec: disable the ExtraFiles test on darwinBrad Fitzpatrick
Still a mystery. New issue 2603 filed. R=golang-dev, dsymonds, iant CC=golang-dev https://golang.org/cl/5503063
2011-12-21os/exec: put the print where it will helpRuss Cox
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5501058
2011-12-21os/exec: dump lsof on failureRuss Cox
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5504063
2011-12-22os/exec: enable inherited file descriptor testAndrew Gerrand
Fixes #2596. R=golang-dev CC=golang-dev https://golang.org/cl/5498061
2011-12-20os: don't trust O_CLOEXEC on OS XBrad Fitzpatrick
OS X 10.6 doesn't do O_CLOEXEC. OS X 10.7 does. For now, always fall back to using syscall.CloseOnExec on darwin. This can removed when 10.6 is old news, or if we find a way to cheaply & reliably detect 10.6 vs 10.7 at runtime. Fixes #2587 R=golang-dev, rsc, iant CC=golang-dev https://golang.org/cl/5500053
2011-12-19exec: disable new test to fix buildIan Lance Taylor
TBR=bradfitz CC=golang-dev https://golang.org/cl/5494075
2011-12-19net, syscall, os: set CLOEXEC flag on epoll/kqueue descriptorIan Lance Taylor
Enable new test in os. R=dave, iant, rsc CC=golang-dev https://golang.org/cl/5494061
2011-12-19exec: add test to verify net package's epoll fd doesn't go to childBrad Fitzpatrick
R=rsc CC=golang-dev https://golang.org/cl/5490075
2011-12-15os/exec: fix -test.run argument for new 'go test'Russ Cox
In 'go test' I deleted the leading package. prefix from all the test names, since it contained no actual information. Adjust the -test.run argument accordingly. This will still work with the current gotest too, since the argument is an unanchored pattern. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5491058
2011-11-03os,text,unicode: renamingsRob Pike
This is Go 1 package renaming CL #4. This one merely moves the source; the import strings will be changed after the next weekly release. This one moves pieces into os, text, and unicode. exec -> os/exec scanner -> text/scanner tabwriter -> text/tabwriter template -> text/template template/parse -> text/template/parse utf16 -> unicode/utf16 utf8 -> unicode/utf8 This should be the last of the source-rearranging CLs. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5331066