[Aboriginal] Patch: fix smoketest timeout behaviour with FORK=1

Rob Landley rob at landley.net
Tue Oct 15 19:55:50 PDT 2013

On 10/01/2013 06:25:41 AM, Patrick Lauer wrote:
> This patch makes the timeout for smoketest configurable and increases
> the limit when FORK=1

The native-build.sh timeout was already configurable, and the problem  
with smoketest.sh is that stdin eats an unknown amount of data during  
initialization. (It varies by target; serial chip initialization  
flushes the buffer and stuff like powerpc with a 1024 character  

So the "cat thingy | qemu" case doesn't work because it may eat all of  
the input before the shell starts.) I need something more like expect  
where it waits for a prompt THEN sends data. (I started writing a shell  
script that made FIFOs, and got it working, but it was too complex for  
me to be comfortable with.)

The alternative is feeding it a hello world build control image, which  
I've done but that doesn't work for stuff like sh4 that can't give me a  
third drive to attach the image to.

Longer term, I'm poking at having the base system (toybox+musl, enough  
to boot to a shell prompt) live in initramfs, and then:

1) Putting network block device client and server in toybox. (I did the  
client for busybox, but need to write the server side.) That lets us  
mount the native compiler (hda squashfs image) without an emulated  
block device, and also the build control image.

2) Putting a 9p server in toybox, and letting the virtual system mount  
a directory from the host to use as /home (hdb ext2 image).

(Posibly the 9p server could also do the hda and hdc images, but that's  
a farish todo item.)

> This is needed even on fast machines - on a 3.4Ghz quadcore I get
> timeouts for sparc, ppc reliably and other targets randomly.

Sparc qemu is unstable. It'll hang if the host running the emulator is  
doing much else. Some sort of timing issue. Dunno if it's the kernel or  
the emulator.

> With 180sec = 3 minutes it reliably finishes even when all are started
> in parallel, increasing to 5 minutes or even more might be reasonable.


I'm applying this patch, but long-term smoketest.sh needs a rewrite  
along the lines mentioned above.


More information about the Aboriginal mailing list