selftest: Reduce time in cleanup loop, try waitpid on all 3 children
authorAndrew Bartlett <abartlet@samba.org>
Mon, 5 Mar 2012 00:12:00 +0000 (11:12 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 5 Mar 2012 07:15:05 +0000 (08:15 +0100)
selftest/target/Samba3.pm

index 87763aa..797ae71 100755 (executable)
@@ -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);