Skip to content

Commit

Permalink
Fix dmesg log issue
Browse files Browse the repository at this point in the history
In some test environments, we will get the following dmesg log:
  dmesg log:[01;31m[K[[m[K[01;31m[KS[m[K[01;31m[Ku[m[K[01;31m
  [Kn[m[K[01;31m[K [m[K[01;31m[KF[m[K[01;31m[Ke[m[K[01;31m[Kb
  [m[K[01;31m[K [m[K[01; ...

So update code to avoid this issue.

Signed-off-by: lcheng <[email protected]>
  • Loading branch information
cliping committed Feb 28, 2024
1 parent 2ddf56c commit 360ba92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virttest/utils_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@ def __get_kernel_messages(level_check=3, session=None):
output: multi-line string containing all read messages
status: exit code of read command
"""
cmd = "dmesg -T -l %s|grep ." % ",".join(
cmd = "dmesg -T -l %s|grep . --color never" % ",".join(
map(str, xrange(0, int(level_check))))
if session:
environ = "guest"
Expand Down

0 comments on commit 360ba92

Please sign in to comment.