-
Notifications
You must be signed in to change notification settings - Fork 951
testing: implement {Skip,Fail}Now #4736
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
Conversation
PR tinygo-org#4623 implements runtime.GoExit() with which we can improve the testing package and align it more to upstream testing behavour https://cs.opensource.google/go/go/+/refs/tags/go1.24.0:src/testing/testing.go;l=1150 Signed-off-by: leongross <[email protected]>
3a50c6b
to
fe2784f
Compare
Thanks for the improvement @leongross now merging. |
@deadprogram thanks for reviewing and merging. |
PR tinygo-org/tinygo#4736 adds runtime.Goexit to {Skip,Fail}Now, which currently fails in the go tests. Signed-off-by: leongross <[email protected]>
PR tinygo-org/tinygo#4736 adds runtime.Goexit to {Skip,Fail}Now, which currently fails in the go tests. Signed-off-by: leongross <[email protected]>
PR tinygo-org/tinygo#4736 adds runtime.Goexit to {Skip,Fail}Now, which currently fails in the go tests. Signed-off-by: leongross <[email protected]>
PR tinygo-org/tinygo#4736 adds runtime.Goexit to {Skip,Fail}Now, which currently fails in the go tests. Signed-off-by: leongross <[email protected]>
@leongross how did you test this? Because when I try to run a trivial test like this: package main_test
import "testing"
func TestFoo(t *testing.T) {
t.Skip("testing skip")
println("after skip")
} It crashes with an error like this:
(Currently testing in a Windows ARM VM, I can later test the same thing on Linux for example). |
This is also happening on MacOS:
|
This reverts commit c5879c6. It doesn't look like this is working (see #4736 (comment)), and it doesn't have any tests anyway to prove that it does work. So I think it's best to revert it for now and add a working implementation with tests in the future.
This reverts commit c5879c6. It doesn't look like this is working (see #4736 (comment)), and it doesn't have any tests anyway to prove that it does work. So I think it's best to revert it for now and add a working implementation with tests in the future.
@aykevl I investigated this error and found that it has to do with the signal handling in the The |
@leongross that's unrelated. The problem is that it exits the main goroutine (at least that's what I think happens) so there's no goroutine left. The reason it deadlocks instead of emitting a runtime panic when a signal is enabled, is because theoretically a signal might arrive which might unblock a blocked goroutine. But then you just end up with a deadlocked program instead of a runtime panic - not an improvement. I think the only way to implement In any case, next time please include a test to show that it works :) |
PR tinygo-org/tinygo#4736 adds runtime.Goexit to {Skip,Fail}Now, which currently fails in the go tests. Signed-off-by: leongross <[email protected]>
PR #4623 implements runtime.GoExit() with which we can improve the testing package and align it more to upstream testing behavior https://cs.opensource.google/go/go/+/refs/tags/go1.24.0:src/testing/testing.go;l=1150