windows: fix PSAPI_WORKING_SET_EX_BLOCK bit accessors Shared, Locked, LargePage and Bad compared a masked bit against 1, as in (b & (1 << 22)) == 1, which is never true for a bit other than bit 0. All four always returned false. Compare against 0 instead, and do the same in Valid for consistency. Add a table test over the bit positions, and a test that checks QueryWorkingSetEx reports a page locked with VirtualLock as Locked. Extend TestQueryWorkingSetEx to query pages of a file mapping and check that they are reported as Shared. All fail without this change. Fixes golang/go#81797 Change-Id: Ib4bf00c7406398c21b3eb31717f6da765aa51757 Reviewed-on: https://go-review.googlesource.com/c/sys/+/843385 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This repository holds supplemental Go packages for low-level interactions with the operating system.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/sys.
The main issue tracker for the sys repository is located at https://go.dev/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.