[poky] Another sanity test tweak
Richard Purdie
richard.purdie at linuxfoundation.org
Thu Dec 23 09:45:22 PST 2010
On Thu, 2010-12-23 at 23:19 +0800, Xu, Jiajun wrote:
> I tested above code and it works correctly on my machine. One thing
> needs modification is the count value we check.
>
> diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
> index 608c6f0..684929a 100644
> --- a/scripts/qemuimage-testlib
> +++ b/scripts/qemuimage-testlib
> @@ -204,12 +204,12 @@ Test_Kill_Qemu()
> # function to check if there is any qemu process
> Test_Check_Qemu_UP()
> {
> - local count=`ps -ef | grep -c qemu`
> - if [ ${count} -lt 2 ]; then
> + local count=`ps -eo command | cut -d" " -f 1 | grep -c '\(^qemu\|.*/qemu\)'`
> + if [ ${count} -ne 1 ]; then
> Test_Info "There is no Qemu process"
> return 1
> else
> - Test_Info "There is at least Qemu process running"
> + Test_Info "There is at least one Qemu process running"
> return 0
> fi
> }
>
> > Also, waiting 120 seconds for the qemu network to be up is fine. For
> > the actual process to be running I'd suggest we just wait 10 seconds
> > maximum as if it ever takes longer than that, we have a problem. I'd propose the following change:
> >
> > @@ -383,9 +383,7 @@ Test_Create_Qemu()
> > # Get the pid of the xterm processor, which will be used in
> > Test_Kill_Qemu PID=$!
> > - sleep 5
> > -
> > - while [ ${up_time} -lt ${timeout} ]
> > + while [ ${up_time} -lt 10 ]
> > do
> > Test_Check_Qemu_UP
> > if [ $? -ne 0 ]; then
> > Are you ok with these changes?
> >
>
> Agree. We don’t' need to wait such a long time for qemu up.
Thanks, I've merged these along with another fix I noticed which I think
was stopping qemu starting on the autobuilder.
Cheers,
Richard
More information about the poky
mailing list