qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 3/6] tests: pull qemu-nbd iotest helpers into co


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH 3/6] tests: pull qemu-nbd iotest helpers into common.nbd file
Date: Fri, 16 Nov 2018 15:41:15 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
The helpers for starting/stopping qemu-nbd in 058 will be useful in
other test cases, so move them into a common.nbd file.

Signed-off-by: Daniel P. Berrangé <address@hidden>
---
  tests/qemu-iotests/058        | 47 +++++------------------------
  tests/qemu-iotests/common.nbd | 56 +++++++++++++++++++++++++++++++++++
  2 files changed, 64 insertions(+), 39 deletions(-)
  create mode 100644 tests/qemu-iotests/common.nbd


-
-_cleanup_nbd()
-{

-_wait_for_nbd()
-{

+++ b/tests/qemu-iotests/common.nbd
@@ -0,0 +1,56 @@
+#!/bin/bash

I know we're using bash,

+
+function nbd_server_stop()
+{

+function nbd_server_wait_for_unix_socket()

and bash supports 'function', but it is an obsolete syntactic sugar thing that I don't recommend using. (In ksh, it actually makes a difference in behavior whether you use 'function' or not, and using it in 'bash' makes it harder to port code over to 'ksh' - and hence in bash it is obsolete because here it does NOT cause the change in behavior that ksh users expect)

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



reply via email to

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