Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_boot_debugkernel: skip set kmemleak if cpu > 36 #471

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion os_tests/tests/test_general_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,7 @@ def test_check_dmesg_sev(self):
key_steps:
# dmesg|grep -i sev
expect_result:
AMD Memory Encryption Features active: SEV
"AMD Memory Encryption Features active: SEV"
debug_want:
# dmesg
"""
Expand Down
14 changes: 9 additions & 5 deletions os_tests/tests/test_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ def test_boot_debugkernel(self):
utils_lib.run_cmd(self, cmd, expect_ret=0, msg="change default boot index")
cmd = 'cat /proc/cmdline'
cmd_options = utils_lib.run_cmd(self, cmd)
if 'kmemleak=on' not in cmd_options:
need_reboot = True
cmd = 'cat /proc/cpuinfo |grep processor|wc -l'
cpucount = utils_lib.run_cmd(self, cmd, msg='get cpu count')
self.log.info("Do not collect memory leak when cpucount is over 36 - RHEL-65525")
if int(cpucount) <= 36:
if 'kmemleak=on' not in cmd_options:
need_reboot = True
cmd = 'sudo grubby --update-kernel=ALL --args="kmemleak=on"'
utils_lib.run_cmd(self, cmd, expect_ret=0, msg="enable kmemleak")
if need_reboot:
cmd = 'sudo grubby --update-kernel=ALL --args="kmemleak=on"'
utils_lib.run_cmd(self, cmd, expect_ret=0, msg="enable kmemleak")
utils_lib.run_cmd(self, 'sudo reboot', msg='reboot system under test')
time.sleep(10)
utils_lib.init_connection(self, timeout=self.ssh_timeout)
Expand Down Expand Up @@ -177,7 +181,7 @@ def test_boot_debugkernel(self):
self.log.info("Wait for bootup finish......")
time.sleep(1)
utils_lib.run_cmd(self, "sudo dmesg", expect_not_kw="Call trace,Call Trace")
if int(mini_mem) <= 32:
if int(mini_mem) <= 32 and int(cpucount) <= 36:
cmd = 'sudo bash -c "echo scan > /sys/kernel/debug/kmemleak"'
utils_lib.run_cmd(self, cmd, expect_ret=0, timeout=1800)

Expand Down
Loading