qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 4/7] qemu-iotests: add 058 internal snapshot


From: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V3 4/7] qemu-iotests: add 058 internal snapshot export with qemu-nbd case
Date: Thu, 10 Oct 2013 14:06:34 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

于 2013/10/1 22:53, Eric Blake 写道:
On 09/25/2013 06:16 PM, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia<address@hidden>
---
+_export_nbd_snapshot()
+{
+    eval "$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG -l $1&"
Uggh.  Why do you need an eval here?  Especially given that there was
recently a patch to properly quote $TEST_IMG in case the tests are run
inside a directory whose absolute name included a space.  What's wrong
with just directly:

$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port "$TEST_IMG" -l $1 $

  Just a copy and paste for "eval", will remove it.

+    NBD_SNAPSHOT_PID=$!
+    sleep 1
+}
+
+_export_nbd_snapshot1()
+{
+    eval "$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG -L 
snapshot.name=$1&"
Likewise; and given my complaint on 2-3/7, it would be nicer to support
this with only one option name spelling.

+_cleanup()
+{
+    if [ -n "$NBD_SNAPSHOT_PID" ]; then
+        kill $NBD_SNAPSHOT_PID
+    fi
+       _cleanup_test_img
Kill the TAB, fix the indentation.

  Will fix.

+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+. ./common.pattern
+
+# Any format supporting intenal snapshots
s/intenal/internal/

 will fix.

+_supported_fmt qcow2
+_supported_proto generic
+_supported_os Linux
Is this test truly Linux-only?
  I think it is generic, will remove it.





reply via email to

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