kill the pmgpolicy instance started for the tests before dying.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
$sock->flush;
my $res = <$sock>;
chomp $res;
$sock->flush;
my $res = <$sock>;
chomp $res;
- my $timediff = $ttime - $starttime;
- die "unexpected result at time $timediff: $res != $eres\n$data" if !($res =~ m/^action=$eres(\s.*)?/);
+ if ($res !~ m/^action=$eres(\s.*)?/) {
+ my $timediff = $ttime - $starttime;
+ system("kill `cat $testpidfn`") if -f $testpidfn;
+ die "unexpected result at time $timediff: $res != $eres\n$data"
+ }