mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-24 18:52:08 +00:00
runtime: fix go test case
reload removed kernel modules to later testcases Signed-off-by: Balint Tobik <btobik@redhat.com>
This commit is contained in:
parent
a4d3f813c2
commit
e1805eceda
@ -348,6 +348,15 @@ func TestCheckHostIsVMContainerCapable(t *testing.T) {
|
||||
|
||||
defer func() {
|
||||
os.Remove(denylistModuleConf)
|
||||
// reload removed modules
|
||||
for mod := range archRequiredKernelModules {
|
||||
cmd := exec.Command(modProbeCmd, mod)
|
||||
if output, err := cmd.CombinedOutput(); err == nil {
|
||||
kataLog.WithField("output", string(output)).Info("module loaded")
|
||||
} else {
|
||||
kataLog.WithField("output", string(output)).Warn("failed to load module")
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// remove the modules to force a failure
|
||||
|
Loading…
Reference in New Issue
Block a user