Cédric Le Goater <clg@kaod.org> writes:
Hello Alex,
On 11/11/22 15:55, Alex Bennée wrote:
This attempts to deal with the problem of login prompts not being
guaranteed to be terminated with a newline. The solution to this is to
peek at the incoming data looking to see if we see an up-coming match
before we fall back to the old readline() logic. The reason to mostly
rely on readline is because I am occasionally seeing the peek stalling
despite data being there.
This seems kinda hacky and gross so I'm open to alternative
approaches
and cleaner python code.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
I have pulled this patch in the aspeed tree hoping it would improve tests:
AST2x00MachineSDK.test_arm_ast2500_evb_sdk
AST2x00MachineSDK.test_arm_ast2600_evb_sdk
but the failure rate has increased :/ I have seen failures in these also :
AST2x00Machine.test_arm_ast2500_evb_buildroot
AST2x00Machine.test_arm_ast2600_evb_buildroot
which used to be quite stable.
Sorry, this is not of much help. the issue might be elsewhere.
Do you see what is happening in the logs? I've made a couple of tweaks
since and it gets through the negotiation but then timesout:
console: looking for 22:(ast2600-default login:), sending None (always=False)
/console: [ 0.939039] aspeed-pcie 1e7700c0.pcie: [1] : tx idle timeout [0]
-console: [ 1.385144] spi-nor spi0.1: unrecognized JEDEC id bytes: 00 00
00 00 00 00
console: [ 1.413028] spi-nor spi2.0: unrecognized JEDEC id bytes: 00 00
00 00 00 00
console: [ 1.617539] aspeed-rtc 1e781000.rtc: hctosys: unable to read the
hardware clock
-console: rofs = mtd4 squashfs rwfs = mtd5 jffs2
/console: [ 14.563495] systemd[1]: Failed to find module 'autofs4'
-console: [ 18.034371] systemd[176]:
/lib/systemd/system-generators/systemd-gpt-auto-generator failed with exit
status 1.
|console: [FAILED] Failed to start Intel Power Control for the Host 0.
/console: [FAILED] Failed to start Phosphor C…istening on device /dev/ttyS2.
console: [DEPEND] Dependency failed for Host logger for ttyS2.
-console: Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)
nodistro.0 ast2600-default ttyS4
console: ast2600-default login:
(always=False)g for 9:(Password:), sending root
console: root
|console: Password:
(always=False)g for 23:(root@ast2600-default:~#), sending 0penBmc
console: Login timed out after 60 seconds.
|console: Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)
nodistro.0 ast2600-default ttyS4
/avocado.test: