[PATCH 2/2] tests: commandtest: Make 'test4' checking daemonization more reliable

Ján Tomko jtomko at redhat.com
Thu Jul 23 08:16:22 UTC 2020

On a Tuesday in 2020, Peter Krempa wrote:
>The 'commandhelper' checks effectively whether the parent process is
>still around to report whether it was daemonized or not.
>This creates a unlikely race condition in cases when we do actually
>daemonize the process as the intermediate process used for the
>daemonization might not have terminated yet which would report wrong
>result leading to test failure.
>For now there's just 'test4' which actually daemonizes the process.
>Add an argument '--check-daemonize' which asks for retires of the


>daemonization check in cases where we expect that the commandhelper is
>going to be daemonized and use it in 'test4' to make the test more
>I've observed the test failure sporradically when my box is more loaded


( justone r, like the islands https://en.wikipedia.org/wiki/Sporades )


:%s/more loaded/under load/g


:%s/more loaded/under heavy load/g

>e.g. while building two trees at once.
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> tests/commanddata/test4.log |  1 +
> tests/commandhelper.c       | 17 ++++++++++++++++-
> tests/commandtest.c         |  3 ++-
> 3 files changed, 19 insertions(+), 2 deletions(-)

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Thank you for fixing this.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200723/d4856dfd/attachment-0001.sig>

More information about the libvir-list mailing list