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

Issue 1806043: code review 1806043: os: Use TempFile with default TempDir for temp test files

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by peterGo
Modified:
13 years, 9 months ago
Reviewers:
adg, rsc1
CC:
adg, golang-dev
Visibility:
Public.

Description

os: Use TempFile with default TempDir for temp test files Use io/ioutil.TempFile with default os.TempDir for temporary test files. For os_test.go temporary test files, use a local file system and OS independent directory names. Avoid problems with NFS. Fixes issue 848.

Patch Set 1 #

Total comments: 1

Patch Set 2 : code review 1806043: os: Use TempFile with default TempDir for temp test files #

Patch Set 3 : code review 1806043: os: Use TempFile with default TempDir for temp test files #

Total comments: 6

Patch Set 4 : code review 1806043: os: Use TempFile with default TempDir for temp test files #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -88 lines) Patch
M src/pkg/os/os_test.go View 1 2 3 11 chunks +79 lines, -88 lines 2 comments Download

Messages

Total messages: 11
peterGo
http://codereview.appspot.com/1806043/diff/1/2 File src/pkg/os/os_test.go (right): http://codereview.appspot.com/1806043/diff/1/2#newcode1 src/pkg/os/os_test.go:1: // Copyright 2009 The Go Authors. All rights reserved. ...
13 years, 9 months ago (2010-07-11 18:58:02 UTC) #1
peterGo
Hello adg, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 9 months ago (2010-07-11 18:59:29 UTC) #2
peterGo
Hello adg, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2010-07-11 22:03:28 UTC) #3
adg
Some nits below. http://codereview.appspot.com/1806043/diff/7001/8001 File src/pkg/os/os_test.go (right): http://codereview.appspot.com/1806043/diff/7001/8001#newcode383 src/pkg/os/os_test.go:383: defer Remove(f.Name()) defer statements are executed ...
13 years, 9 months ago (2010-07-12 02:04:34 UTC) #4
peterGo
http://codereview.appspot.com/1806043/diff/7001/8001 File src/pkg/os/os_test.go (right): http://codereview.appspot.com/1806043/diff/7001/8001#newcode383 src/pkg/os/os_test.go:383: defer Remove(f.Name()) On 2010/07/12 02:04:34, adg wrote: > defer ...
13 years, 9 months ago (2010-07-12 03:52:17 UTC) #5
peterGo
Hello adg, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2010-07-12 03:53:30 UTC) #6
adg
LGTM http://codereview.appspot.com/1806043/diff/14001/15001 File src/pkg/os/os_test.go (right): http://codereview.appspot.com/1806043/diff/14001/15001#newcode486 src/pkg/os/os_test.go:486: defer f.Close() remove this defer as we call ...
13 years, 9 months ago (2010-07-12 03:57:37 UTC) #7
peterGo
http://codereview.appspot.com/1806043/diff/14001/15001 File src/pkg/os/os_test.go (right): http://codereview.appspot.com/1806043/diff/14001/15001#newcode486 src/pkg/os/os_test.go:486: defer f.Close() On 2010/07/12 03:57:37, adg wrote: > remove ...
13 years, 9 months ago (2010-07-12 04:12:59 UTC) #8
adg
On 12 July 2010 14:12, <go.peter.90@gmail.com> wrote: > > http://codereview.appspot.com/1806043/diff/14001/15001 > File src/pkg/os/os_test.go (right): > ...
13 years, 9 months ago (2010-07-12 04:59:38 UTC) #9
rsc1
LGTM leaving for adg
13 years, 9 months ago (2010-07-12 21:38:01 UTC) #10
adg
13 years, 9 months ago (2010-07-13 00:31:59 UTC) #11
*** Submitted as http://code.google.com/p/go/source/detail?r=96fb5a5b7ad7 ***

os: Use TempFile with default TempDir for temp test files

Use io/ioutil.TempFile with default os.TempDir for temporary test files.
For os_test.go temporary test files, use a local file system and OS
independent directory names. Avoid problems with NFS.

Fixes issue 848.

R=adg
CC=golang-dev
http://codereview.appspot.com/1806043

Committer: Andrew Gerrand <adg@golang.org>
Sign in to reply to this message.

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