mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
selftest/qemurunner: Work around possible control character contamination
Using a binary string as the login banner search expression is fraught with risks. We've seen cases on the autobuilder where "login:" is clearly shown but the code hasn't triggered. The most likely cause is hidden control characters in the output causing the search to fail. Take the opportunity to remove the horrible binary string search, at the expense of decoding the bootlog multiple times. Tweak the logging so we can know which log was printed (self.msg or bootlog) just in case this isn't the issue and we need more information in future. (From OE-Core rev: 91b9e30e08695e715ef14c3df7471e8c99f9deb5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -189,11 +189,7 @@ def get_testimage_boot_patterns(d):
|
||||
search_login_succeeded,search_cmd_finished\n Make sure your TESTIMAGE_BOOT_PATTERNS=%s \
|
||||
contains an accepted flag.' % d.getVar('TESTIMAGE_BOOT_PATTERNS'))
|
||||
return
|
||||
# We know boot prompt is searched through in binary format, others might be expressions
|
||||
if flag == 'search_reached_prompt':
|
||||
boot_patterns[flag] = flagval.encode()
|
||||
else:
|
||||
boot_patterns[flag] = flagval.encode().decode('unicode-escape')
|
||||
boot_patterns[flag] = flagval.encode().decode('unicode-escape')
|
||||
return boot_patterns
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user