Skip to content

Commit

Permalink
Merge pull request avocado-framework-tests#2817 from vaishnavibhat/dy…
Browse files Browse the repository at this point in the history
…namic_debug

Enable dynamic debug only if secureboot is off [wait for avocado pull/5929]
  • Loading branch information
abdhaleegit authored Jul 9, 2024
2 parents 6e2637e + 81a2dbc commit b3d03d1
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 @@ -157,10 +158,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 @@ -1149,9 +1153,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 b3d03d1

Please sign in to comment.