From fd84b23367f5c3764da3f3aec41215c1a1ab88c4 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Wed, 6 Dec 2023 06:59:44 -0800 Subject: [PATCH] gvisor: set type for all TraceBlockReason constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the gvisor nogo checks are failing with this error: gvisor/pkg/sync/runtime_exectracer2.go:21:2: only the first constant in this group has an explicit type I don’t know why the constants in runtime_exectracer1.go do not seem to trigger this error, but either way, the fix is simple enough. PiperOrigin-RevId: 588412325 --- pkg/sync/runtime_exectracer2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sync/runtime_exectracer2.go b/pkg/sync/runtime_exectracer2.go index 4ec3baf97..f6094cab6 100644 --- a/pkg/sync/runtime_exectracer2.go +++ b/pkg/sync/runtime_exectracer2.go @@ -19,5 +19,5 @@ package sync // TraceBlockReason constants, from Go's src/runtime/trace2runtime.go. const ( TraceBlockSelect TraceBlockReason = 3 // +checkconst runtime traceBlockSelect - TraceBlockSync = 5 // +checkconst runtime traceBlockSync + TraceBlockSync TraceBlockReason = 5 // +checkconst runtime traceBlockSync )