On Mon, 2023-12-18 at 11:23 +0000, Richard Purdie via lists.openembedded.org wrote: > On Mon, 2023-12-11 at 15:57 +0000, Alex Bennée wrote: > > If qemurunner doesn't continuously drain stdout we will eventually > > cause QEMU to block while trying to write to the pipe. This can > > manifest itself if the guest has for example configured its serial > > ports to output via stdio even if the test itself is using a TCP > > console or SSH to run things. > > > > To do this: > > > > - always create a logging thread regardless of serial_ports > > - use a semaphore between main and logging threads > > - move the login detection into the logging thread > > - wait until the second acquire before continuing > > > > This doesn't address a potential overflow of stderr although generally > > stderr from QEMU will be a lot less likely to block due to the volume > > of data. > > > > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > > Cc: Mikko Rapeli <mikko.rap...@linaro.org> > > --- > > > > "bitbake core-image-full-cmdline > -c testimage" just hangs, it can't work out the login prompt. > > This code has been the source of a lot of races issues and intermittent > failures which we only "just" got to the bottom of and introducing a > load more isn't something I'm feeling great about. I'll try and find > some time to see if I can work out any better approach.
I've posted an alternative couple of patches to this. Could you see if they help please? I realised that we may be having the overflowing buffer problem on the serial connection as well as stdout. qemu stderr is being sent to stdout so hopefully there isn't an issue there. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192669): https://lists.openembedded.org/g/openembedded-core/message/192669 Mute This Topic: https://lists.openembedded.org/mt/103111135/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-