Skip to content

Commit 5ce2cac

Browse files
committed
cmd/runtimetest: fix NewPid deprecation warning
This is supposed to be in commit 8e1a3b5 but apparently I lost a hunk during rebase. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 181da7f commit 5ce2cac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/runtimetest/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,13 @@ func (c *complianceTester) validateCapabilities(spec *rspec.Spec) error {
272272
last = capability.CAP_BLOCK_SUSPEND
273273
}
274274

275-
processCaps, err := capability.NewPid(0)
275+
processCaps, err := capability.NewPid2(0)
276276
if err != nil {
277277
return err
278278
}
279+
if err := processCaps.Load(); err != nil {
280+
return err
281+
}
279282

280283
for _, capType := range []struct {
281284
capType capability.CapType

0 commit comments

Comments
 (0)