From e1805eceda4bf60781e86aef5c36586a7f8e023b Mon Sep 17 00:00:00 2001 From: Balint Tobik Date: Wed, 30 Apr 2025 16:35:38 +0200 Subject: [PATCH] runtime: fix go test case reload removed kernel modules to later testcases Signed-off-by: Balint Tobik --- src/runtime/cmd/kata-runtime/kata-check_amd64_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go b/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go index 2c37c3cdec..2ffb25b514 100644 --- a/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go +++ b/src/runtime/cmd/kata-runtime/kata-check_amd64_test.go @@ -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