Skip to content

Commit

Permalink
Enable dynamic debug only if secureboot is off
Browse files Browse the repository at this point in the history
When secureboot is enabled, dynamic debug fails to get
enabled. vnic dynamic debug is enabled if secureboot is disabled on the
OS side.

Signed-off-by: Vaishnavi Bhat <[email protected]>
  • Loading branch information
vaishnavibhat committed May 9, 2024
1 parent 5975212 commit 81a2dbc
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions io/net/virt-net/network_virtualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from avocado.utils.network.hosts import LocalHost
from avocado.utils.ssh import Session
from avocado.utils import wait
from avocado.utils import linux
from pexpect import pxssh
import re
from avocado.utils.network.hosts import RemoteHost
Expand Down Expand Up @@ -156,10 +157,13 @@ def setUp(self):
'failover' in str(self.name.name):
self.cancel("this test is not needed")
self.local = LocalHost()
cmd = "echo 'module ibmvnic +pt; func send_subcrq -pt' > /sys/kernel/debug/dynamic_debug/control"
result = process.run(cmd, shell=True, ignore_status=True)
if result.exit_status:
self.fail("failed to enable debug mode")
if not linux.is_os_secureboot_enabled():
cmd = "echo 'module ibmvnic +pt; func send_subcrq -pt' > /sys/kernel/debug/dynamic_debug/control"
result = process.run(cmd, shell=True, ignore_status=True)
if result.exit_status:
self.fail("failed to enable debug mode")
else:
self.log("failed to enable debug mode")

@staticmethod
def get_mcp_component(component):
Expand Down Expand Up @@ -1132,9 +1136,10 @@ def tearDown(self):
except Exception:
self.log.debug("Unable to set back the original active device")
self.session_hmc.quit()
cmd = "echo 'module ibmvnic -pt; func send_subcrq -pt' > /sys/kernel/debug/dynamic_debug/control"
result = process.run(cmd, shell=True, ignore_status=True)
if result.exit_status:
self.log.debug("failed to disable debug mode")
if not linux.is_os_secureboot_enabled():
cmd = "echo 'module ibmvnic -pt; func send_subcrq -pt' > /sys/kernel/debug/dynamic_debug/control"
result = process.run(cmd, shell=True, ignore_status=True)
if result.exit_status:
self.log.debug("failed to disable debug mode")
self.tune_rxtx_queue()
self.session.quit()

0 comments on commit 81a2dbc

Please sign in to comment.