From 4c926a708d5d9a4b5e986b8aa18cdb95e8dc0142 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Mar 2012 11:12:00 +1100 Subject: selftest: Reduce time in cleanup loop, try waitpid on all 3 children --- selftest/target/Samba3.pm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'selftest/target') diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 87763aadec..797ae715bb 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -54,9 +54,12 @@ sub teardown_env($$) # This should give it time to write out the gcov data until ($count > 20) { - if (Samba::cleanup_child($smbdpid, "smbd") == -1 - && Samba::cleanup_child($nmbdpid, "nmbd") == -1 - && Samba::cleanup_child($winbinddpid, "winbindd") == -1) { + my $smbdchild = Samba::cleanup_child($smbdpid, "smbd"); + my $nmbdchild = Samba::cleanup_child($nmbdpid, "nmbd"); + my $winbinddchild = Samba::cleanup_child($winbinddpid, "winbindd"); + if ($smbdchild == -1 + && $nmbdchild == -1 + && $winbinddchild == -1) { last; } sleep(1); @@ -73,9 +76,12 @@ sub teardown_env($$) $count = 0; until ($count > 10) { - if (Samba::cleanup_child($smbdpid, "smbd") == -1 - && Samba::cleanup_child($nmbdpid, "nmbd") == -1 - && Samba::cleanup_child($winbinddpid, "winbindd") == -1) { + my $smbdchild = Samba::cleanup_child($smbdpid, "smbd"); + my $nmbdchild = Samba::cleanup_child($nmbdpid, "nmbd"); + my $winbinddchild = Samba::cleanup_child($winbinddpid, "winbindd"); + if ($smbdchild == -1 + && $nmbdchild == -1 + && $winbinddchild == -1) { last; } sleep(1); -- cgit