[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-iotests: Fixed no scratch directory in qem
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-iotests: Fixed no scratch directory in qemu-iotests |
Date: |
Mon, 11 Apr 2011 09:34:38 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden> 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