-
Notifications
You must be signed in to change notification settings - Fork 18k
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
runtime: No stack trace during TestRaiseException #32036
Comments
/cc @alexbrainman |
If I comment out |
Unfortunately the test output doesn't provide more useful details so I can't locate the root of cause. Please try to reproduce the error, if not I can provide more detailed information of my environment. |
I have no idea why test fails on your computer. Sorry. Alex |
@rixtox you can try and debug this https://play.golang.org/p/Ie_6Cg3NXYK program. It prints this
here. What does it prints for you? Alex |
Here's the output:
Which is actually the expected output. |
@alexbrainman Sorry for sending an exe file but I can't think of other way to demonstrate this problem. Running |
OK I found another way to demonstrate it. So I first compiled the master branch by commenting out the failing test. Then under
Now the compiled program outputs empty. |
I won't run you executable. Sorry.
I hope you know that you don't need to run tests to "compile" Go. Tests are run to verify that all build tools and libraries work as expected. You can build Go by just running
I looked at the test. And it does approximately this
I also noticed that your output contains
What kind of shell is that? Go executable are Windows execrable - they require standard Windows environment to run in. TestRaiseException actually requires that Windows exception handling work as standard. Maybe your shell affects that. Alex |
Yes I know, and I'm already using the compiled go for my project development. But it doesn't mean the failing test should be dismissed just because it doesn't affects my usage.
It's a normal Windows CMD.exe shell, just running inside ConEmu so it has that So I've tested both the
As you can see, your code |
Same code, but its executed differently. Your raise_exception program is executed directly by your shell. But testprog is started by shell, and then testprog creates another process that runs code that does the testing. Perhaps something goes amiss when child process gets created. Perhaps some environment variable missing from child process. Perhaps child process stdio / stdout / stderr redirection is broken. Alex |
That's how But you are right about the shell environment though. I started a CMD shell outside of ConEmu and And if I change your code to https://play.golang.org/p/lg-zJKObRMX, by importing the So I suspect something in the |
I do not know what your problem is. Alex |
I will close this issue until someone willing to investigate further to reopen it. |
I'm not sure I understand why you closed this. If this is a real issue it should remain open. If it no longer occurs, then it's fine to close it. |
I was compiling the master branch on Windows 10 Enterprise 1809 build 17763.475. I encountered the same error in #11481 but that issue was closed and locked so I'm opening a new one.
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
All tests pass.
What did you see instead?
The text was updated successfully, but these errors were encountered: