[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v5 09/10] qemu-iotests: add option to save temp
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v5 09/10] qemu-iotests: add option to save temp files on error |
Date: |
Wed, 18 Oct 2017 09:33:45 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/17/2017 11:31 AM, Jeff Cody wrote:
> Now that ./check takes care of cleaning up after each tests, it
> can also selectively not clean up. Add option to leave all output from
> tests intact if that test encountered an error.
>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
> tests/qemu-iotests/check | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
> index 057ea39..a66f7b0 100755
> --- a/tests/qemu-iotests/check
> +++ b/tests/qemu-iotests/check
> @@ -125,6 +125,7 @@ sortme=false
> expunge=true
> have_test_arg=false
> cachemode=false
> +save_on_err=false
>
> tmp="${TEST_DIR}"/$$
> rm -f $tmp.list $tmp.tmp $tmp.sed
> @@ -263,6 +264,8 @@ other options
> -o options -o options to pass to qemu-img create/convert
> -T output timestamps
> -c mode cache mode
> + -s save test scratch directory on test failure
Is there an easy way to force all tests to fail (and thus preserve the
scratch directory for inspection, even though the test normally would
succeed)? It might serve as a useful double-check that you got
everything in this series, maybe even worth documenting in the commit
messages.
> +
> + if [ "$save_on_err" != "true" ] || [ "$err" != "true" ]
> + then
> + rm -rf "$TEST_DIR_SEQ"
> + fi
I suppose the easiest way is to hack this 'if'.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers, (continued)
- [Qemu-block] [PATCH v5 06/10] qemu-iotests: make ./check automatically reap QEMU processes, Jeff Cody, 2017/10/17
- [Qemu-block] [PATCH v5 07/10] qemu-iotests: run python tests in own subdirectories, Jeff Cody, 2017/10/17
- [Qemu-block] [PATCH v5 04/10] qemu-iotests: remove file cleanup from bash tests, Jeff Cody, 2017/10/17
- [Qemu-block] [PATCH v5 09/10] qemu-iotests: add option to save temp files on error, Jeff Cody, 2017/10/17
- Re: [Qemu-block] [PATCH v5 09/10] qemu-iotests: add option to save temp files on error,
Eric Blake <=
- [Qemu-block] [PATCH v5 10/10] qemu-iotests: add support for running multi-threaded iotests, Jeff Cody, 2017/10/17
- [Qemu-block] [PATCH v5 08/10] qemu-iotests: modify python tests to run from subdir, Jeff Cody, 2017/10/17