internal/cpu: use 'off' for disabling cpu capabilities instead of '0'

Updates #27218

Change-Id: I4ce20376fd601b5f958d79014af7eaf89e9de613
Reviewed-on: https://go-review.googlesource.com/c/141818
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Martin Möhrmann 2018-10-12 18:01:50 +02:00
parent 797689fb8e
commit b612cef047
3 changed files with 11 additions and 11 deletions

View file

@ -38,14 +38,14 @@ func runDebugOptionsTest(t *testing.T, test string, options string) {
}
func TestDisableAllCapabilities(t *testing.T) {
runDebugOptionsTest(t, "TestAllCapabilitiesDisabled", "all=0")
runDebugOptionsTest(t, "TestAllCapabilitiesDisabled", "all=off")
}
func TestAllCapabilitiesDisabled(t *testing.T) {
MustHaveDebugOptionsSupport(t)
if os.Getenv("GODEBUGCPU") != "all=0" {
t.Skipf("skipping test: GODEBUGCPU=all=0 not set")
if os.Getenv("GODEBUGCPU") != "all=off" {
t.Skipf("skipping test: GODEBUGCPU=all=off not set")
}
for _, o := range Options {