[{"id":1760407,"web_url":"http://patchwork.ozlabs.org/comment/1760407/","msgid":"<ccb4009d-6522-f1df-57aa-c0778eec551b@redhat.com>","list_archive_url":null,"date":"2017-08-30T18:49:39","subject":"Re: [Qemu-devel] [PATCH v3 5/5] qemu-iotests: add option to save\n\ttemp files on error","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 08/30/2017 11:52 AM, Jeff Cody wrote:\n> Now that ./check takes care of cleaning up after each tests, it\n> can also selectively not clean up.  Add option to leave all output from\n> tests intact if that test encountered an error.\n> \n> Note: this currently only works for bash tests, as the python tests\n> still clean up after themselves manually.\n> \n> Signed-off-by: Jeff Cody <jcody@redhat.com>\n> ---\n>  tests/qemu-iotests/check  | 10 +++++++++-\n>  tests/qemu-iotests/common |  6 ++++++\n>  2 files changed, 15 insertions(+), 1 deletion(-)\n> \n> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check\n> index f6ca85d..8a5fc0d 100755\n> --- a/tests/qemu-iotests/check\n> +++ b/tests/qemu-iotests/check\n> @@ -370,7 +370,15 @@ do\n>              fi\n>          fi\n>  \n> -        rm -rf \"$TEST_DIR_SEQ\"\n> +        #TODO: There is some intial work to save intermediate files\n\ns/intial/initial/\n\n> +        #      in python tests, but it is imperfect.  Having each\n> +        #      test record its test name, and the tearDown function\n> +        #      just move intermediate images to a subdirectory with\n> +        #      the test name may prove more useful.\n\nComment works for me, and I'm fine with the idea you present here being\nin a followup patch.  So with the typo fixed,\nReviewed-by: Eric Blake <eblake@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjF2254z0z9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 04:50:33 +1000 (AEST)","from localhost ([::1]:52206 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dn84L-0006Jj-Gi\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 14:50:29 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34552)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dn83s-0006Bj-B9\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 14:50:01 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dn83r-0007V6-CI\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 14:50:00 -0400","from mx1.redhat.com ([209.132.183.28]:43496)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>)\n\tid 1dn83m-0007TT-Jj; Wed, 30 Aug 2017 14:49:54 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 3C97BC9D30;\n\tWed, 30 Aug 2017 18:49:53 +0000 (UTC)","from [10.10.122.186] (ovpn-122-186.rdu2.redhat.com [10.10.122.186])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 9B9A598172;\n\tWed, 30 Aug 2017 18:49:40 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 3C97BC9D30","To":"Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org","References":"<cover.1504111803.git.jcody@redhat.com>\n\t<e99a5e3feefe5fdb54d64fb80b09089618a0ff49.1504111803.git.jcody@redhat.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<ccb4009d-6522-f1df-57aa-c0778eec551b@redhat.com>","Date":"Wed, 30 Aug 2017 13:49:39 -0500","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<e99a5e3feefe5fdb54d64fb80b09089618a0ff49.1504111803.git.jcody@redhat.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"CHchxNXHR9XVOaNg0WgjegUM4guPfJoNs\"","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tWed, 30 Aug 2017 18:49:53 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"Re: [Qemu-devel] [PATCH v3 5/5] qemu-iotests: add option to save\n\ttemp files on error","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"stefanha@redhat.com, kwolf@redhat.com, jsnow@redhat.com,\n\tarmbru@redhat.com, qemu-block@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1760549,"web_url":"http://patchwork.ozlabs.org/comment/1760549/","msgid":"<c5a2ea74-7c0b-0596-f07c-3b1ab00aa9b5@redhat.com>","list_archive_url":null,"date":"2017-08-30T22:38:40","subject":"Re: [Qemu-devel] [PATCH v3 5/5] qemu-iotests: add option to save\n\ttemp files on error","submitter":{"id":64343,"url":"http://patchwork.ozlabs.org/api/people/64343/","name":"John Snow","email":"jsnow@redhat.com"},"content":"On 08/30/2017 12:52 PM, Jeff Cody wrote:\n> Now that ./check takes care of cleaning up after each tests, it\n> can also selectively not clean up.  Add option to leave all output from\n> tests intact if that test encountered an error.\n> \n> Note: this currently only works for bash tests, as the python tests\n> still clean up after themselves manually.\n> \n> Signed-off-by: Jeff Cody <jcody@redhat.com>\n> ---\n>  tests/qemu-iotests/check  | 10 +++++++++-\n>  tests/qemu-iotests/common |  6 ++++++\n>  2 files changed, 15 insertions(+), 1 deletion(-)\n> \n> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check\n> index f6ca85d..8a5fc0d 100755\n> --- a/tests/qemu-iotests/check\n> +++ b/tests/qemu-iotests/check\n> @@ -370,7 +370,15 @@ do\n>              fi\n>          fi\n>  \n> -        rm -rf \"$TEST_DIR_SEQ\"\n> +        #TODO: There is some intial work to save intermediate files\n> +        #      in python tests, but it is imperfect.  Having each\n> +        #      test record its test name, and the tearDown function\n> +        #      just move intermediate images to a subdirectory with\n> +        #      the test name may prove more useful.\n> +        if [ \"$save_on_err\" != \"true\" ] || [ \"$err\" != \"true\" ]\n> +        then\n> +            rm -rf \"$TEST_DIR_SEQ\"\n> +        fi\n>  \n>      fi\n>  \n> diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common\n> index d34c11c..d08b233 100644\n> --- a/tests/qemu-iotests/common\n> +++ b/tests/qemu-iotests/common\n> @@ -42,6 +42,7 @@ expunge=true\n>  have_test_arg=false\n>  randomize=false\n>  cachemode=false\n> +save_on_err=false\n>  rm -f $tmp.list $tmp.tmp $tmp.sed\n>  \n>  export IMGFMT=raw\n> @@ -172,6 +173,7 @@ other options\n>      -T                  output timestamps\n>      -r                  randomize test order\n>      -c mode             cache mode\n> +    -s                  save test scratch directory on test failure\n>  \n>  testlist options\n>      -g group[,group...]        include tests from these groups\n> @@ -349,6 +351,10 @@ testlist options\n>              xgroup=true\n>              xpand=false\n>              ;;\n> +        -s)\n> +            save_on_err=true\n> +            xpand=false\n> +            ;;\n>          '[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]')\n>              echo \"No tests?\"\n>              status=1\n> \n\nThis, however, is definitely awesome.\n\nTested-by: John Snow <jsnow@redhat.com>\nReviewed-by: John Snow <jsnow@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jsnow@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjL5w3H3rz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 08:39:16 +1000 (AEST)","from localhost ([::1]:53053 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnBdi-0005sW-Km\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 18:39:14 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58726)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dnBdL-0005ql-KZ\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:38:52 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dnBdK-0005a6-Lz\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:38:51 -0400","from mx1.redhat.com ([209.132.183.28]:53812)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <jsnow@redhat.com>)\n\tid 1dnBdE-0005Yt-Ex; Wed, 30 Aug 2017 18:38:44 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 69C9B81DE2;\n\tWed, 30 Aug 2017 22:38:43 +0000 (UTC)","from [10.18.17.130] (dhcp-17-130.bos.redhat.com [10.18.17.130])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 64498176BC;\n\tWed, 30 Aug 2017 22:38:40 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 69C9B81DE2","To":"Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org","References":"<cover.1504111803.git.jcody@redhat.com>\n\t<e99a5e3feefe5fdb54d64fb80b09089618a0ff49.1504111803.git.jcody@redhat.com>","From":"John Snow <jsnow@redhat.com>","Message-ID":"<c5a2ea74-7c0b-0596-f07c-3b1ab00aa9b5@redhat.com>","Date":"Wed, 30 Aug 2017 18:38:40 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<e99a5e3feefe5fdb54d64fb80b09089618a0ff49.1504111803.git.jcody@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tWed, 30 Aug 2017 22:38:43 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v3 5/5] qemu-iotests: add option to save\n\ttemp files on error","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, stefanha@redhat.com, armbru@redhat.com,\n\tqemu-block@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]