* [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
* Re: [Qemu-devel] [PATCH] qemu-iotests: Fixed no scratch directory in qemu-iotests
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
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-04-11 8:34 UTC (permalink / raw)
To: Lyu Mitnick; +Cc: qemu-devel
On Sat, Apr 09, 2011 at 05:21:24AM +0800, Lyu Mitnick wrote:
> This my first time to submit patch, please tell me if I have something
> wrong!
Please CC Christoph Hellwig <hch@lst.de> who maintains qemu-iotests.
Also, please prepend the email subject with "[qemu-iotests]" so it's
easy to spot that this patch is for qemu-iotests.git and not qemu.git..
> 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
TEST_DIR is the temporary directory used to keep files while a test
runs. You've hardcoded 'scratch' and will create it in the current
directory.
The user should be able to set TEST_DIR. Please use TEST_DIR instead of
hardcoding 'scratch'.
For example, the following should create /tmp/iotests-tmp if it does not
exist already:
$ TEST_DIR=/tmp/iotests-tmp ./check
And the following should create ./scratch if it does not exist already:
$ ./check
Stefan
^ permalink raw reply [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).