From dc9bdda08481a28ea1f2aaaab411a2044af1da98 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 2 Dec 2022 11:57:16 +0000 Subject: [PATCH] tests/nbd: Unlink pidfile before running qemu-nbd It might be left over from a previous failed run. Best to unlink the old file before starting qemu-nbd, so there's no possibility of getting confused later when we wait for the file to appear. --- tests/nbd/test-nbd.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/nbd/test-nbd.pl b/tests/nbd/test-nbd.pl index 4a6b0ec66..8119ab305 100755 --- a/tests/nbd/test-nbd.pl +++ b/tests/nbd/test-nbd.pl @@ -52,6 +52,7 @@ sub run_test { my $cwd = getcwd (); my $server; my $pidfile = "$cwd/nbd/nbd.pid"; + unlink "$pidfile"; my @qemu_nbd = ("qemu-nbd", $disk, "-t", "--pid-file", $pidfile); if ($has_format_opt) { push @qemu_nbd, "--format", "raw";