All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: hch@lst.de
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] qemu-iotests: Allow spaces in io() operation
Date: Mon, 20 Jul 2009 14:08:42 +0200	[thread overview]
Message-ID: <1248091723-5934-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1248091723-5934-1-git-send-email-kwolf@redhat.com>

We need to be able to pass "write -b" as an operation to the pattern testing
functions. Unfortunately, this contains a space character...

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 common.pattern |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/common.pattern b/common.pattern
index 63df923..08e1cda 100644
--- a/common.pattern
+++ b/common.pattern
@@ -46,18 +46,18 @@ function do_io() {
 }
 
 function io_pattern() {
-    do_io $@ | $QEMU_IO $TEST_IMG | _filter_qemu_io
+    do_io "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io
 }
 
 function io() {
     local start=$2
     local pattern=$(( (start >> 9) % 256 ))
 
-    do_io $@ $pattern | $QEMU_IO $TEST_IMG | _filter_qemu_io
+    do_io "$@" $pattern | $QEMU_IO $TEST_IMG | _filter_qemu_io
 }
 
 function io_zero() {
-    do_io $@ 0 | $QEMU_IO $TEST_IMG | _filter_qemu_io
+    do_io "$@" 0 | $QEMU_IO $TEST_IMG | _filter_qemu_io
 }
 
 function io_test() {
@@ -65,28 +65,28 @@ function io_test() {
     local offset=$2
 
     # Complete clusters (size = 4k)
-    io $op $offset 4096 4096 256
+    io "$op" $offset 4096 4096 256
     offset=$((offset + 256 * 4096))
 
     # From somewhere in the middle to the end of a cluster
-    io $op $((offset + 2048)) 2048 4096 256
+    io "$op" $((offset + 2048)) 2048 4096 256
     offset=$((offset + 256 * 4096))
 
     # From the start to somewhere in the middle of a cluster
-    io $op $offset 2048 4096 256
+    io "$op" $offset 2048 4096 256
     offset=$((offset + 256 * 4096))
 
     # Completely misaligned (and small)
-    io $op $((offset + 1024)) 2048 4096 256
+    io "$op" $((offset + 1024)) 2048 4096 256
     offset=$((offset + 256 * 4096))
 
     # Spanning multiple clusters
-    io $op $((offset + 2048)) 8192 12288 64
+    io "$op" $((offset + 2048)) 8192 12288 64
     offset=$((offset + 64 * 12288))
 
     # Spanning multiple L2 tables
     # L2 table size: 512 clusters of 4k = 2M
-    io $op $((offset + 2048)) 4194304 4999680 8
+    io "$op" $((offset + 2048)) 4194304 4999680 8
     offset=$((offset + 8 * 4999680))
 
     if false; then
-- 
1.6.0.6

  reply	other threads:[~2009-07-20 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 12:08 [Qemu-devel] [PATCH 0/2] qemu-iotests: Test bdrv_load/save_vmstate Kevin Wolf
2009-07-20 12:08 ` Kevin Wolf [this message]
2009-07-20 12:40 ` [Qemu-devel] " Christoph Hellwig
2009-07-20 12:44   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248091723-5934-2-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.