qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/4] iotests: Switch nbd tests to use Unix rather than TCP


From: Eric Blake
Subject: Re: [PATCH v3 2/4] iotests: Switch nbd tests to use Unix rather than TCP
Date: Mon, 18 Nov 2019 16:18:01 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 11/18/19 11:42 AM, Eric Blake wrote:

- TEST_IMG="$DRIVER,file.driver=nbd,file.host=127.0.0.1,file.port=10810" + TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix,file.path=$SOCKDIR/$IMGFMT"

Maybe nbd.$IMGFMT?

At first glance, it seems reasonable.  But reading further,


      elif [ "$IMGPROTO" = "ssh" ]; then
          TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
TEST_IMG="$DRIVER,file.driver=ssh,file.host=127.0.0.1,file.path=$TEST_IMG_FILE"
@@ -233,7 +233,7 @@ else
          TEST_IMG=$TEST_DIR/t.$IMGFMT
      elif [ "$IMGPROTO" = "nbd" ]; then
          TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
-        TEST_IMG="nbd:127.0.0.1:10810"
+        TEST_IMG="nbd+unix:///?socket=$SOCK_DIR/nbd"

Shouldn’t this be $IMGFMT, too (instead of nbd)?  (Or maybe nbd.$IMGFMT)


If anything, I'm inclined to use $SOCK_DIR/nbd.raw to indicate that the NBD client sees raw format, regardless of the format in use by the server, to leave the door open for $SOCK_DIR/nbd.qcow2 when we finally are happy to test qcow2 format over NBD.

Naming the socket $SOCK_DIR/nbd.raw means that filters tend to rename it to $SOCK_DIR/nbd.IMGFMT before my attempt to rename everything to TEST_DIR/t.IMGFMT. So I'm now leaning towards just naming the socket $SOCK_DIR/nbd and leave it at that.


Or stick to just $SOCK_DIR/nbd hard-coded everywhere, and quit trying to use $IMGFMT in the socket name, to make all the usage consistent.


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]