+ if (defined $progB) {
+ # wait for the child to be finished
+ # tried things such as:
+ # wait;
+ # $SIG{CHLD} = sub { wait };
+ # but nothing worked:
+ # e.g. running mssnapshot.vgtest in a loop failed from time to time
+ # due to some missing output (not yet written?).
+ # So, we search progB.done during max 100 times 100 millisecond.
+ my $count;
+ for ($count = 1; $count <= 100; $count++) {
+ (-f "progB.done") or select(undef, undef, undef, 0.100);
+ }
+ # Filter stdout
+ if (defined $stdoutB_filter) {
+ mysystem("$stdoutB_filter < $name.stdoutB.out > $tmp");
+ filtered_rename($tmp, "$name.stdoutB.out");
+ }
+ # Find all the .stdoutB.exp files. If none, use /dev/null.
+ my @stdoutB_exps = <$name.stdoutB.exp*>;
+ @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
+ do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps);
+
+ # Filter stderr
+ mysystem("$stderrB_filter < $name.stderrB.out > $tmp");
+ filtered_rename($tmp, "$name.stderrB.out");
+ # Find all the .stderrB.exp files. At least one must exist.
+ my @stderrB_exps = <$name.stderrB.exp*>;
+ (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
+ do_diffs($fullname, $name, "stderrB", \@stderrB_exps);
+ }
+