#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
Issue created automatically to collect these failures.
Example (log):
=== RUN TestGetKeyboardLayout
syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle.
--- FAIL: TestGetKeyboardLayout (0.00s)
Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-17 07:58 x_sys-go1.21-windows-arm64 sys@bce4cf76 release-branch.go1.21@e073febe x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-17 07:58 x_sys-go1.22-windows-arm64 sys@bce4cf76 release-branch.go1.22@4b27560d x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-17 07:58 x_sys-go1.23-windows-arm64 sys@bce4cf76 release-branch.go1.23@30b6fd60 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-17 17:57 x_sys-go1.21-windows-arm64 sys@7bb0bf70 release-branch.go1.21@dabed2e0 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-17 17:57 x_sys-go1.22-windows-arm64 sys@7bb0bf70 release-branch.go1.22@4c50f916 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-17 17:57 x_sys-go1.23-windows-arm64 sys@7bb0bf70 release-branch.go1.23@f5e4e45e x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-22 20:52 x_sys-go1.21-windows-arm64 sys@beb59498 release-branch.go1.21@dabed2e0 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-22 20:52 x_sys-go1.22-windows-arm64 sys@beb59498 release-branch.go1.22@4c50f916 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-22 20:52 x_sys-go1.23-windows-arm64 sys@beb59498 release-branch.go1.23@90c6558b x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 15:35 x_sys-go1.21-windows-arm64 sys@d03a8072 release-branch.go1.21@dabed2e0 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 15:35 x_sys-go1.22-windows-arm64 sys@d03a8072 release-branch.go1.22@70a1aae6 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 15:35 x_sys-go1.23-windows-arm64 sys@d03a8072 release-branch.go1.23@f5e4e45e x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 16:33 x_sys-go1.21-windows-arm64 sys@31ef9e72 release-branch.go1.21@dabed2e0 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 16:33 x_sys-go1.22-windows-arm64 sys@31ef9e72 release-branch.go1.22@70a1aae6 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 16:33 x_sys-go1.23-windows-arm64 sys@31ef9e72 release-branch.go1.23@c9940fe2 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-29 14:24 x_sys-go1.21-windows-arm64 sys@cde4660e release-branch.go1.21@dabed2e0 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-29 14:24 x_sys-go1.22-windows-arm64 sys@cde4660e release-branch.go1.22@70a1aae6 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-29 14:24 x_sys-go1.23-windows-arm64 sys@cde4660e release-branch.go1.23@c9940fe2 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: cherrymui
The windows arm64 builder seems failing consistently since CL 574755.
cc @aymanbagabas @alexbrainman @golang/windows
Comment From: aymanbagabas
It works fine locally on go version go1.22.4 windows/arm64
. Could we use GetLastError()
to get more context on the error?
Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-17 07:58 x_sys-gotip-windows-arm64 sys@bce4cf76 go@fc51e502 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-17 17:57 x_sys-gotip-windows-arm64 sys@7bb0bf70 go@a799fa51 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-22 20:52 x_sys-gotip-windows-arm64 sys@beb59498 go@e76353d5 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 15:35 x_sys-gotip-windows-arm64 sys@d03a8072 go@bd6f911f x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-24 16:33 x_sys-gotip-windows-arm64 sys@31ef9e72 go@0fe775e9 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-29 14:24 x_sys-go1.22-windows-arm64 sys@cde4660e release-branch.go1.22@8c8adffd x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@ecadbe9f x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: alexbrainman
It works fine locally on
go version go1.22.4 windows/arm64
.
I am glad it works for you. But we still need to fix the builder.
Could we use
GetLastError()
to get more context on the error?
It fails with
=== RUN TestGetKeyboardLayout
syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle.
--- FAIL: TestGetKeyboardLayout (0.00s)
and displayed GetWindowThreadProcessId error is returned by the GetLastError function.
I just looked at GetForegroundWindow docs https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow and it says
The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation.
I suspect what happens here is that the windows/arm64 builder returns nil from GetForegroundWindow, and that is why GetWindowThreadProcessId fails.
I will send a CL to remove the TestGetKeyboardLayout.
Alex
Comment From: gopherbot
Change https://go.dev/cl/602335 mentions this issue: windows: delete TestGetKeyboardLayout
Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@11dbbaff x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@a9ad4108 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@3a55b92c x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@aac7106c x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@2ca1ae8e x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@b874005a x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@40876244 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-07-29 14:24 x_sys-gotip-windows-arm64 sys@cde4660e go@f428c7b7 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-08-03 07:06 x_sys-go1.22-windows-arm64 sys@aa1c4c85 release-branch.go1.22@8c8adffd x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)2024-08-03 07:06 x_sys-gotip-windows-arm64 sys@aa1c4c85 go@f428c7b7 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"
2024-08-03 07:06 x_sys-gotip-windows-arm64 sys@aa1c4c85 go@d465aee0 x/sys/windows.TestGetKeyboardLayout (log)
=== RUN TestGetKeyboardLayout syscall_windows_test.go:1445: GetWindowThreadProcessId failed: Invalid window handle. --- FAIL: TestGetKeyboardLayout (0.00s)Comment From: gopherbot
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "golang.org/x/sys/windows" && test == "TestGetKeyboardLayout"