qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-iotests: Fixed no scratch directory in qemu-iotests
@ 2011-04-08 21:21 Lyu Mitnick
  2011-04-11  8:34 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Lyu Mitnick @ 2011-04-08 21:21 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

This my first time to submit patch, please tell me if I have something
wrong!

Create scratch/ on first run.

Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
---
 common.config |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/common.config b/common.config
index bdd0530..09923d9 100644
--- a/common.config
+++ b/common.config
@@ -102,6 +102,15 @@ export QEMU_IO="$QEMU_IO_PROG $QEMU_IO_OPTIONS"

 [ -f /etc/qemu-iotest.config ]       && . /etc/qemu-iotest.config

+if [ -e scratch -a ! -d scratch ]; then
+    echo "scratch exist and is not a directory"
+    exit 1
+fi
+
+if [ ! -e scratch ]; then
+    mkdir scratch
+fi
+
 if [ ! -e "$TEST_DIR" ]; then
     TEST_DIR=`pwd`/scratch
 fi
-- 
1.7.0.4

[-- Attachment #2: Type: text/html, Size: 928 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-11  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 21:21 [Qemu-devel] [PATCH] qemu-iotests: Fixed no scratch directory in qemu-iotests Lyu Mitnick
2011-04-11  8:34 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).