tests/nbd: Move temporary files into tests/nbd/ subdirectory

This test fails for reasons I have not fully understood yet.  However
one thing I noticed is that the Unix domain socket and PID file used
the tests are placed in the tests/ directory, not the tests/nbd/
subdirectory, so let's fix that:

Starting qemu-nbd fedora-nbd.img -t --pid-file /home/rjones/d/libguestfs-rhel-9.2/tests/nbd.pid --format raw -p 63668 ...
Starting qemu-nbd fedora-nbd.img -t --pid-file /home/rjones/d/libguestfs-rhel-9.2/tests/nbd.pid --format raw -p 60684 ...
Starting qemu-nbd fedora-nbd.img -t --pid-file /home/rjones/d/libguestfs-rhel-9.2/tests/nbd.pid --format raw -k /home/rjones/d/libguestfs-rhel-9.2/tests/unix.sock ...

Fixes: commit 6d32773e81
(cherry picked from commit 98ab261a05)
This commit is contained in:
Richard W.M. Jones
2022-12-02 11:35:57 +00:00
parent 464da7d651
commit 01cbb1ca05

View File

@@ -51,7 +51,7 @@ sub run_test {
my $cwd = getcwd ();
my $server;
my $pidfile = "$cwd/nbd.pid";
my $pidfile = "$cwd/nbd/nbd.pid";
my @qemu_nbd = ("qemu-nbd", $disk, "-t", "--pid-file", $pidfile);
if ($has_format_opt) {
push @qemu_nbd, "--format", "raw";
@@ -64,7 +64,7 @@ sub run_test {
}
else {
# qemu-nbd insists the socket path is absolute.
my $socket = "$cwd/unix.sock";
my $socket = "$cwd/nbd/unix.sock";
unlink "$socket";
push @qemu_nbd, "-k", "$socket";
$server = "unix:$socket";