[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-1.4] libqtest: Wait for the right child PID
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH for-1.4] libqtest: Wait for the right child PID after killing QEMU |
Date: |
Fri, 01 Feb 2013 01:25:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 |
Am 28.01.2013 19:15, schrieb Eduardo Habkost:
> When running "make check" with gcov enabled, we get the following
> message:
>
> hw/tmp105.gcda:cannot open data file, assuming not executed
>
> The problem happens because:
>
> * tmp105-test exits before QEMU exits, because waitpid() at
> qtest_quit() fails;
> * waitpid() fails because there's another process already
> waiting for the QEMU process;
> * The process that is already waiting for QEMU is the child created by
> qtest_init() to run system();
> * qtest_quit() is incorrectly waiting for the QEMU PID directly instead
> of the child created by qtest_init().
>
> This fixes the problem by sending SIGTERM to QEMU, but waiting for the
> child process created by qtest_init() (that exits immediately after QEMU
> exits).
>
> Reported-by: Andreas Färber <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
Tested-by: Andreas Färber <address@hidden>
Thanks a lot for the quick analysis and fix!
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg