-
Notifications
You must be signed in to change notification settings - Fork 18k
Test didn't passed on Windows 7 #1899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Attaching patch. Attachments:
|
I thought we decided that string didn't matter. Owner changed to @alexbrainman. Status changed to Accepted. |
Now we can compile and run the program. On Unix, this would be the result: $ 6g file.go # compile file package $ 6g helloworld3.go # compile main package $ 6l -o helloworld3 helloworld3.6 # link - no need to mention "file" $ helloworld3 hello, world can't open file; err=No such file or directory $ An I/O Package, A Tutorial for the Go Programming Language. http://golang.org/doc/go_tutorial.html As the carefully crafted tutorial clearly states: "On Unix, this would be the result: ... 'can't open file; err=No such file or directory'." On Windows, the result is different: 'can't open file; err=The system cannot find the path specified.' It's unreasonable to expect the text of error messages in Unix and Windows to be the same, especially when they use native OS error numbers and message text. Don't apply the attached patch! |
This is a dup of https://golang.org/issue/1834. Russ, what do you think we should do to fix this "problem"? Alex |
Hi Should we use a table for error numbers to checking this, rather than using error messages? Although error numbers are native to each OS, but it's more predictable than messages. (The locale setting affected this as seen in issue #1834.) Cheers Chanwit |
Hi all, So what I see is the log showing in the end of the build. However, I didn't see the final "ALL TESTS PASSED" message. Attached to support claim. Attachments:
|
My build log is different (see attached). I don't know what your problem is. Perhaps if you show full bash trace, we will see which command fails: cd $GOROOT/doc/progs bash -x run Thank you. Alex Attachments:
|
I ran bash -x run and kept outputs in the log. $ bash -x run 2> log cannot create 8.out.exe The "cannot create 8.out.exe" message appeared like above. Attached is the log file. Chanwit Attachments:
|
It looks like linker 8l sortmain.8 can't write to the output file 8.out.exe. I don't know why. Perhaps, the file is still locked by the previously running program process (cat_rot13). Could you put 1 second sleep at the end of testit and testitpipe functions like that: diff -r 96d9616ffbad doc/progs/run --- a/doc/progs/run Wed Jun 01 14:17:09 2011 +1000 +++ b/doc/progs/run Thu Jun 02 14:05:20 2011 +1000 @@ -41,6 +41,7 @@ then echo $1 failed: '"'$x'"' is not '"'$3'"' fi + sleep 1 } function testitpipe { @@ -50,6 +51,7 @@ then echo $1 failed: '"'$x'"' is not '"'$3'"' fi + sleep 1 } and re-run the exercise. Thank you. Alex |
Hi I submitted another patch adding "sleep 1" and "if $GOOS". Hope it's working better. Attachments:
|
I use Joe's "prepackaged" files: https://bitbucket.org/jpoirier/go_mingw/downloads. Perhaps you could try them and see if that fixes your problem. Thank you. |
Just an update, I can reproduce your problem on Windows 7 PCs. I think the problem here is that Windows opens and reads 8.out.exe file in between it gets executed by Windows and gets re-created by 8l.exe again. I have used ProcessMonitor to diagnose problem. Please see log.txt attached for the output. I put some comments there to interpret the data. We are not the only ones affected. There are a few people complaining. One of those is: http://stackoverflow.com/questions/3764072/c-win32-how-to-wait-for-a-pending-delete-to-complete. I hit this problem while running other parts of go build as well: doc/progs/run test/bench/timing.sh test/run Not sure what to do yet. Alex Attachments:
|
Issue #1834 has been merged into this issue. |
Comment 28 by jp@webmaster.ms: Why not to have unique executable file name for each test instead of recreating 8.out.exe ? |
Comment 30 by webmaster@webmaster.ms: There are also test scripts like test/64bit.go which explicitly create two exe files under same name. So this solution implies modification more files than just test/run I think, linker just have to wait and try again after receiving the "Permission Denied" error. |
Comment 32 by webmaster@webmaster.ms: Waiting actually did not help, sometimes it takes very long time. Renaming helps. I'll submit CL. |
Fixed by https://code.google.com/p/go/source/detail?r=f650efd9ed8da7a203d08e88cc9361d627bc7ab1. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by chanwit:
The text was updated successfully, but these errors were encountered: