Skip to content

Commit b677237

Browse files
committed
io/iommu/amd: Add addtional journalctl check for kernel logs
Current code checks dmesg alone for kernel logs. But for cases where dmesg is cleared, checking journalctl adds more confidence on the outcome of kernel logs check. Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
1 parent edda668 commit b677237

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

io/iommu/amd/iommu_v2pgmode_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def check_dmesg(string):
5050
"""
5151
cmd = f'dmesg | grep -i "{string}"'
5252
output = process.run(cmd, ignore_status=True, shell=True).stdout_text
53-
if output != "":
53+
if output == "":
54+
cmd = f'journalctl -k -b | grep -i "{string}"'
55+
output = process.run(cmd, ignore_status=True, shell=True).stdout_text
56+
if output != "":
57+
return True
58+
else:
5459
return True
5560
return False
5661

0 commit comments

Comments
 (0)