diff options
| author | Jes Cok <xigua67damn@gmail.com> | 2023-11-16 07:06:03 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2023-11-17 15:33:38 +0000 |
| commit | 8f7006a6dff175c7445a245612b8aa028509a15c (patch) | |
| tree | d365d0030c3f00798c8b61f5ee057062d375e832 /src/runtime/testdata | |
| parent | e41fb0fd1a20c77eea85adf9f052ff33fcf099f5 (diff) | |
| download | go-8f7006a6dff175c7445a245612b8aa028509a15c.tar.xz | |
runtime: gofmt -w -s
Change-Id: I2eac85b502df9851df294f8d46c7845f635dde9b
GitHub-Last-Rev: 3c8382442a0fadb355be9e4656942c2e03db2391
GitHub-Pull-Request: golang/go#64198
Reviewed-on: https://go-review.googlesource.com/c/go/+/542697
Run-TryBot: Jes Cok <xigua67damn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/testdata')
| -rw-r--r-- | src/runtime/testdata/testprogcgo/stackswitch.go | 3 | ||||
| -rw-r--r-- | src/runtime/testdata/testprognet/waiters.go | 1 | ||||
| -rw-r--r-- | src/runtime/testdata/testwinlibthrow/main.go | 38 |
3 files changed, 21 insertions, 21 deletions
diff --git a/src/runtime/testdata/testprogcgo/stackswitch.go b/src/runtime/testdata/testprogcgo/stackswitch.go index a2e422f077..70e630e595 100644 --- a/src/runtime/testdata/testprogcgo/stackswitch.go +++ b/src/runtime/testdata/testprogcgo/stackswitch.go @@ -29,7 +29,6 @@ func stackSwitchCallback() { debug.SetGCPercent(gogc) } - // Regression test for https://go.dev/issue/62440. It should be possible for C // threads to call into Go from different stacks without crashing due to g0 // stack bounds checks. @@ -37,7 +36,7 @@ func stackSwitchCallback() { // N.B. This is only OK for threads created in C. Threads with Go frames up the // stack must not change the stack out from under us. func StackSwitchCallback() { - C.callStackSwitchCallbackFromThread(); + C.callStackSwitchCallbackFromThread() fmt.Printf("OK\n") } diff --git a/src/runtime/testdata/testprognet/waiters.go b/src/runtime/testdata/testprognet/waiters.go index 6c8db1f14e..a65c40bfbe 100644 --- a/src/runtime/testdata/testprognet/waiters.go +++ b/src/runtime/testdata/testprognet/waiters.go @@ -18,6 +18,7 @@ import ( // The bug is that netpollWaiters increases monotonically. // This doesn't cause a problem until it overflows. // Use linkname to see the value. +// //go:linkname netpollWaiters runtime.netpollWaiters var netpollWaiters atomic.Uint32 diff --git a/src/runtime/testdata/testwinlibthrow/main.go b/src/runtime/testdata/testwinlibthrow/main.go index ce0c92f252..493e1e11d5 100644 --- a/src/runtime/testdata/testwinlibthrow/main.go +++ b/src/runtime/testdata/testwinlibthrow/main.go @@ -1,19 +1,19 @@ -package main
-
-import (
- "os"
- "syscall"
-)
-
-func main() {
- dll := syscall.MustLoadDLL("veh.dll")
- RaiseNoExcept := dll.MustFindProc("RaiseNoExcept")
- ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept")
-
- thread := len(os.Args) > 1 && os.Args[1] == "thread"
- if !thread {
- RaiseNoExcept.Call()
- } else {
- ThreadRaiseNoExcept.Call()
- }
-}
+package main + +import ( + "os" + "syscall" +) + +func main() { + dll := syscall.MustLoadDLL("veh.dll") + RaiseNoExcept := dll.MustFindProc("RaiseNoExcept") + ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept") + + thread := len(os.Args) > 1 && os.Args[1] == "thread" + if !thread { + RaiseNoExcept.Call() + } else { + ThreadRaiseNoExcept.Call() + } +} |
