mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
2d2ae8809c
The whole struct intelRdtStatus with its methods and a sync.Once is not needed, since intelrtd.Is*Enabled methods are already run-once (or use run-once and a simple comparison). Yet it is still needed for the test to fake values returned by *Enabled. Simplify to use func pointers which a test case overwrites. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
13 lines
272 B
Go
13 lines
272 B
Go
package validate
|
|
|
|
import (
|
|
"github.com/opencontainers/runc/libcontainer/intelrdt"
|
|
)
|
|
|
|
// Allow mocking for TestValidateIntelRdt.
|
|
var (
|
|
intelRdtIsEnabled = intelrdt.IsEnabled
|
|
intelRdtIsCATEnabled = intelrdt.IsCATEnabled
|
|
intelRdtIsMBAEnabled = intelrdt.IsMBAEnabled
|
|
)
|