qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v3 01/10] iotests/277: use dot slash for nbd-fault-injector.p


From: Eric Blake
Subject: Re: [PATCH v3 01/10] iotests/277: use dot slash for nbd-fault-injector.py running
Date: Tue, 21 Apr 2020 07:54:05 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/21/20 2:35 AM, Vladimir Sementsov-Ogievskiy wrote:
Somehow, this doesn't work if you just call ./277. But check 277 works.
We are going to new iotests running framework, which will consider test
files as self-executable, so let's just change it now.

This is a rather vague explanation. I'd prefer something a bit more forthcoming, maybe:

If you run './check 277', check includes common.config which adjusts $PATH to include '.' first, and therefore finds nbd-fault-injector.py on PATH. But if you run './277' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the test fails because the executable is not found. Adjust how we invoke the helper executable to avoid needing a PATH search in the first place.


At any rate, while the commit message could be improved, the fix itself is reasonable.

Reviewed-by: Eric Blake <address@hidden>


Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
  tests/qemu-iotests/277 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/277 b/tests/qemu-iotests/277
index 04aa15a3d5..a4ef1a38c6 100755
--- a/tests/qemu-iotests/277
+++ b/tests/qemu-iotests/277
@@ -40,7 +40,7 @@ def make_conf_file(event):
  def start_server_NBD(event):
      make_conf_file(event)
- srv = subprocess.Popen(['nbd-fault-injector.py', '--classic-negotiation',
+    srv = subprocess.Popen(['./nbd-fault-injector.py', '--classic-negotiation',
                             nbd_sock, conf_file], stdout=subprocess.PIPE,
                             stderr=subprocess.STDOUT, universal_newlines=True)
      line = srv.stdout.readline()


--
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]