From patchwork Mon Nov 19 17:54:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGwX4pJ0z9s0n for ; Tue, 20 Nov 2018 05:05:48 +1100 (AEDT) Received: from localhost ([::1]:58372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnve-0000is-6a for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 13:05:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnl9-0000Q8-CG for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:55:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnl3-0002ew-Cg for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46118) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnkr-0002NP-1T; Mon, 19 Nov 2018 12:54:37 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 581024A6F3; Mon, 19 Nov 2018 17:54:36 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id C2B095C231; Mon, 19 Nov 2018 17:54:34 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:16 -0600 Message-Id: <20181119175427.2298497-2-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 19 Nov 2018 17:54:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 01/12] qemu-iotests: remove unused variable 'here' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, "open list:Block layer core" , Mao Zhongyi , mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mao Zhongyi Running git grep '\$here' tests/qemu-iotests has 0 hits, which means we are setting a variable that has no use. It appears that commit e8f8624d removed the last use. So execute the following cmd to remove all of the 'here=...' lines as dead code. sed -i '/^here=/d' $(git grep -l '^here=' tests/qemu-iotests) Cc: kwolf@redhat.com Cc: mreitz@redhat.com Cc: eblake@redhat.com Suggested-by: Eric Blake Signed-off-by: Mao Zhongyi Message-Id: <20181024094051.4470-3-maozhongyi@cmss.chinamobile.com> Reviewed-by: Eric Blake [eblake: touch up commit message, reorder series, rebase to master] Signed-off-by: Eric Blake --- tests/qemu-iotests/001 | 1 - tests/qemu-iotests/002 | 1 - tests/qemu-iotests/003 | 1 - tests/qemu-iotests/004 | 1 - tests/qemu-iotests/005 | 1 - tests/qemu-iotests/007 | 1 - tests/qemu-iotests/008 | 1 - tests/qemu-iotests/009 | 1 - tests/qemu-iotests/010 | 1 - tests/qemu-iotests/011 | 1 - tests/qemu-iotests/012 | 1 - tests/qemu-iotests/013 | 1 - tests/qemu-iotests/014 | 1 - tests/qemu-iotests/015 | 1 - tests/qemu-iotests/017 | 1 - tests/qemu-iotests/018 | 1 - tests/qemu-iotests/019 | 1 - tests/qemu-iotests/020 | 1 - tests/qemu-iotests/021 | 1 - tests/qemu-iotests/022 | 1 - tests/qemu-iotests/023 | 1 - tests/qemu-iotests/024 | 1 - tests/qemu-iotests/025 | 1 - tests/qemu-iotests/026 | 1 - tests/qemu-iotests/027 | 1 - tests/qemu-iotests/028 | 1 - tests/qemu-iotests/029 | 1 - tests/qemu-iotests/031 | 1 - tests/qemu-iotests/032 | 1 - tests/qemu-iotests/033 | 1 - tests/qemu-iotests/034 | 1 - tests/qemu-iotests/035 | 1 - tests/qemu-iotests/036 | 1 - tests/qemu-iotests/037 | 1 - tests/qemu-iotests/038 | 1 - tests/qemu-iotests/039 | 1 - tests/qemu-iotests/042 | 1 - tests/qemu-iotests/043 | 1 - tests/qemu-iotests/046 | 1 - tests/qemu-iotests/047 | 1 - tests/qemu-iotests/049 | 1 - tests/qemu-iotests/050 | 1 - tests/qemu-iotests/051 | 1 - tests/qemu-iotests/052 | 1 - tests/qemu-iotests/053 | 1 - tests/qemu-iotests/054 | 1 - tests/qemu-iotests/058 | 1 - tests/qemu-iotests/059 | 1 - tests/qemu-iotests/060 | 1 - tests/qemu-iotests/061 | 1 - tests/qemu-iotests/062 | 1 - tests/qemu-iotests/063 | 1 - tests/qemu-iotests/064 | 1 - tests/qemu-iotests/066 | 1 - tests/qemu-iotests/067 | 1 - tests/qemu-iotests/068 | 1 - tests/qemu-iotests/069 | 1 - tests/qemu-iotests/070 | 1 - tests/qemu-iotests/071 | 1 - tests/qemu-iotests/072 | 1 - tests/qemu-iotests/073 | 1 - tests/qemu-iotests/075 | 1 - tests/qemu-iotests/076 | 1 - tests/qemu-iotests/077 | 1 - tests/qemu-iotests/078 | 1 - tests/qemu-iotests/079 | 1 - tests/qemu-iotests/080 | 1 - tests/qemu-iotests/081 | 1 - tests/qemu-iotests/082 | 1 - tests/qemu-iotests/083 | 1 - tests/qemu-iotests/084 | 1 - tests/qemu-iotests/085 | 1 - tests/qemu-iotests/086 | 1 - tests/qemu-iotests/087 | 1 - tests/qemu-iotests/088 | 1 - tests/qemu-iotests/089 | 1 - tests/qemu-iotests/090 | 1 - tests/qemu-iotests/091 | 1 - tests/qemu-iotests/092 | 1 - tests/qemu-iotests/094 | 1 - tests/qemu-iotests/095 | 1 - tests/qemu-iotests/097 | 1 - tests/qemu-iotests/098 | 1 - tests/qemu-iotests/099 | 1 - tests/qemu-iotests/101 | 1 - tests/qemu-iotests/102 | 1 - tests/qemu-iotests/103 | 1 - tests/qemu-iotests/104 | 1 - tests/qemu-iotests/105 | 1 - tests/qemu-iotests/106 | 1 - tests/qemu-iotests/107 | 1 - tests/qemu-iotests/108 | 1 - tests/qemu-iotests/109 | 1 - tests/qemu-iotests/110 | 1 - tests/qemu-iotests/111 | 1 - tests/qemu-iotests/112 | 1 - tests/qemu-iotests/113 | 1 - tests/qemu-iotests/114 | 1 - tests/qemu-iotests/115 | 1 - tests/qemu-iotests/116 | 1 - tests/qemu-iotests/117 | 1 - tests/qemu-iotests/119 | 1 - tests/qemu-iotests/120 | 1 - tests/qemu-iotests/121 | 1 - tests/qemu-iotests/122 | 1 - tests/qemu-iotests/123 | 1 - tests/qemu-iotests/125 | 1 - tests/qemu-iotests/126 | 1 - tests/qemu-iotests/127 | 1 - tests/qemu-iotests/128 | 1 - tests/qemu-iotests/130 | 1 - tests/qemu-iotests/131 | 1 - tests/qemu-iotests/133 | 1 - tests/qemu-iotests/134 | 1 - tests/qemu-iotests/135 | 1 - tests/qemu-iotests/137 | 1 - tests/qemu-iotests/138 | 1 - tests/qemu-iotests/140 | 1 - tests/qemu-iotests/141 | 1 - tests/qemu-iotests/142 | 1 - tests/qemu-iotests/143 | 1 - tests/qemu-iotests/144 | 1 - tests/qemu-iotests/145 | 1 - tests/qemu-iotests/146 | 1 - tests/qemu-iotests/150 | 1 - tests/qemu-iotests/153 | 1 - tests/qemu-iotests/154 | 1 - tests/qemu-iotests/156 | 1 - tests/qemu-iotests/157 | 1 - tests/qemu-iotests/158 | 1 - tests/qemu-iotests/159 | 1 - tests/qemu-iotests/160 | 1 - tests/qemu-iotests/162 | 1 - tests/qemu-iotests/170 | 1 - tests/qemu-iotests/171 | 1 - tests/qemu-iotests/172 | 1 - tests/qemu-iotests/173 | 1 - tests/qemu-iotests/174 | 1 - tests/qemu-iotests/175 | 1 - tests/qemu-iotests/176 | 1 - tests/qemu-iotests/177 | 1 - tests/qemu-iotests/178 | 1 - tests/qemu-iotests/179 | 1 - tests/qemu-iotests/181 | 1 - tests/qemu-iotests/182 | 1 - tests/qemu-iotests/183 | 1 - tests/qemu-iotests/184 | 1 - tests/qemu-iotests/185 | 1 - tests/qemu-iotests/186 | 1 - tests/qemu-iotests/187 | 1 - tests/qemu-iotests/188 | 1 - tests/qemu-iotests/189 | 1 - tests/qemu-iotests/190 | 1 - tests/qemu-iotests/191 | 1 - tests/qemu-iotests/192 | 1 - tests/qemu-iotests/195 | 1 - tests/qemu-iotests/197 | 1 - tests/qemu-iotests/198 | 1 - tests/qemu-iotests/200 | 1 - tests/qemu-iotests/204 | 1 - tests/qemu-iotests/214 | 1 - tests/qemu-iotests/215 | 1 - tests/qemu-iotests/221 | 1 - tests/qemu-iotests/223 | 1 - tests/qemu-iotests/225 | 1 - tests/qemu-iotests/226 | 1 - tests/qemu-iotests/227 | 1 - tests/qemu-iotests/229 | 1 - tests/qemu-iotests/231 | 1 - tests/qemu-iotests/232 | 1 - 170 files changed, 170 deletions(-) diff --git a/tests/qemu-iotests/001 b/tests/qemu-iotests/001 index ffd14e2ce96..55dcbb71d99 100755 --- a/tests/qemu-iotests/001 +++ b/tests/qemu-iotests/001 @@ -24,7 +24,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/002 b/tests/qemu-iotests/002 index d4f8e91b917..74572b47118 100755 --- a/tests/qemu-iotests/002 +++ b/tests/qemu-iotests/002 @@ -24,7 +24,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/003 b/tests/qemu-iotests/003 index 19889b9fcdb..bf2595559bc 100755 --- a/tests/qemu-iotests/003 +++ b/tests/qemu-iotests/003 @@ -24,7 +24,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/004 b/tests/qemu-iotests/004 index 6f2aa3d9a25..841b15dfaca 100755 --- a/tests/qemu-iotests/004 +++ b/tests/qemu-iotests/004 @@ -24,7 +24,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/005 b/tests/qemu-iotests/005 index 444737751ff..8aa4283a4d5 100755 --- a/tests/qemu-iotests/005 +++ b/tests/qemu-iotests/005 @@ -27,7 +27,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/007 b/tests/qemu-iotests/007 index fa543eeb7db..b983022a7f3 100755 --- a/tests/qemu-iotests/007 +++ b/tests/qemu-iotests/007 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/008 b/tests/qemu-iotests/008 index 8e89d74fe9b..8dfa10bcb89 100755 --- a/tests/qemu-iotests/008 +++ b/tests/qemu-iotests/008 @@ -24,7 +24,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/009 b/tests/qemu-iotests/009 index 16e4475ca4b..73ae09db696 100755 --- a/tests/qemu-iotests/009 +++ b/tests/qemu-iotests/009 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/010 b/tests/qemu-iotests/010 index 151dac238d5..751aca9813c 100755 --- a/tests/qemu-iotests/010 +++ b/tests/qemu-iotests/010 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/011 b/tests/qemu-iotests/011 index f8d044ec857..35909564a91 100755 --- a/tests/qemu-iotests/011 +++ b/tests/qemu-iotests/011 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/012 b/tests/qemu-iotests/012 index 01a770d59c5..de9a5fb4d51 100755 --- a/tests/qemu-iotests/012 +++ b/tests/qemu-iotests/012 @@ -26,7 +26,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013 index d013f87da99..5e1efcee289 100755 --- a/tests/qemu-iotests/013 +++ b/tests/qemu-iotests/013 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014 index 2ea79e8c8b7..9ade571a950 100755 --- a/tests/qemu-iotests/014 +++ b/tests/qemu-iotests/014 @@ -26,7 +26,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/015 b/tests/qemu-iotests/015 index aaf9c3f4150..21f7d42c84f 100755 --- a/tests/qemu-iotests/015 +++ b/tests/qemu-iotests/015 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/017 b/tests/qemu-iotests/017 index 4f9302db42e..1ac6f745025 100755 --- a/tests/qemu-iotests/017 +++ b/tests/qemu-iotests/017 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018 index 1d39d35c479..bba30a1be2c 100755 --- a/tests/qemu-iotests/018 +++ b/tests/qemu-iotests/018 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019 index 24a789a25c0..8f911a79c1a 100755 --- a/tests/qemu-iotests/019 +++ b/tests/qemu-iotests/019 @@ -26,7 +26,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020 index eac5080f83c..6b972d082fe 100755 --- a/tests/qemu-iotests/020 +++ b/tests/qemu-iotests/020 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/021 b/tests/qemu-iotests/021 index 11e8ed7187f..c15ebf9eb8c 100755 --- a/tests/qemu-iotests/021 +++ b/tests/qemu-iotests/021 @@ -24,7 +24,6 @@ owner=hch@lst.de seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/022 b/tests/qemu-iotests/022 index 2452a9f86a0..44765c7b7a1 100755 --- a/tests/qemu-iotests/022 +++ b/tests/qemu-iotests/022 @@ -26,7 +26,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023 index 497ae1ed17c..c8e1b9a761b 100755 --- a/tests/qemu-iotests/023 +++ b/tests/qemu-iotests/023 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024 index 4071ed60935..428b5c815d0 100755 --- a/tests/qemu-iotests/024 +++ b/tests/qemu-iotests/024 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/025 b/tests/qemu-iotests/025 index 70dd5f10aa2..fcd4d97c17d 100755 --- a/tests/qemu-iotests/025 +++ b/tests/qemu-iotests/025 @@ -24,7 +24,6 @@ owner=stefanha@linux.vnet.ibm.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index 582d254195f..31276d9027a 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/027 b/tests/qemu-iotests/027 index 08593da7757..2c46ae1457a 100755 --- a/tests/qemu-iotests/027 +++ b/tests/qemu-iotests/027 @@ -24,7 +24,6 @@ owner=stefanha@linux.vnet.ibm.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index 97a88692512..a2a7c93bcdb 100755 --- a/tests/qemu-iotests/028 +++ b/tests/qemu-iotests/028 @@ -27,7 +27,6 @@ owner=stefanha@linux.vnet.ibm.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/029 b/tests/qemu-iotests/029 index 5cff6875bfc..cf0fe0f6a64 100755 --- a/tests/qemu-iotests/029 +++ b/tests/qemu-iotests/029 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/031 b/tests/qemu-iotests/031 index 1e08abc5ed1..ac0dfaed7dd 100755 --- a/tests/qemu-iotests/031 +++ b/tests/qemu-iotests/031 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/032 b/tests/qemu-iotests/032 index 24bcb52fc2d..3e86bb01119 100755 --- a/tests/qemu-iotests/032 +++ b/tests/qemu-iotests/032 @@ -26,7 +26,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033 index ee8a1338bbd..46b91388efa 100755 --- a/tests/qemu-iotests/033 +++ b/tests/qemu-iotests/033 @@ -24,7 +24,6 @@ owner=pbonzini@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034 index 1b28bdae638..62812cd53cb 100755 --- a/tests/qemu-iotests/034 +++ b/tests/qemu-iotests/034 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/035 b/tests/qemu-iotests/035 index efc38e4d49d..a5716caf327 100755 --- a/tests/qemu-iotests/035 +++ b/tests/qemu-iotests/035 @@ -25,7 +25,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/036 b/tests/qemu-iotests/036 index ce638d60762..4e76602a930 100755 --- a/tests/qemu-iotests/036 +++ b/tests/qemu-iotests/036 @@ -27,7 +27,6 @@ owner=stefanha@linux.vnet.ibm.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037 index c476b823d2b..2e43b19ed04 100755 --- a/tests/qemu-iotests/037 +++ b/tests/qemu-iotests/037 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038 index d99a1501d7a..4e03976023d 100755 --- a/tests/qemu-iotests/038 +++ b/tests/qemu-iotests/038 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 1f48339692d..b3c344cb27c 100755 --- a/tests/qemu-iotests/039 +++ b/tests/qemu-iotests/039 @@ -27,7 +27,6 @@ owner=stefanha@linux.vnet.ibm.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/042 b/tests/qemu-iotests/042 index a53e7cb7578..beaa3390005 100755 --- a/tests/qemu-iotests/042 +++ b/tests/qemu-iotests/042 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/043 b/tests/qemu-iotests/043 index 1c6c22d92a8..fc9005b28fe 100755 --- a/tests/qemu-iotests/043 +++ b/tests/qemu-iotests/043 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index f2ebecf24c7..01c0de62d82 100755 --- a/tests/qemu-iotests/046 +++ b/tests/qemu-iotests/046 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/047 b/tests/qemu-iotests/047 index 1b8f3d4a64e..c168373cf0f 100755 --- a/tests/qemu-iotests/047 +++ b/tests/qemu-iotests/047 @@ -25,7 +25,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/049 b/tests/qemu-iotests/049 index df35b6d21e6..4d0ad5cd50c 100755 --- a/tests/qemu-iotests/049 +++ b/tests/qemu-iotests/049 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050 index 03b4a5d6208..963a0db97f7 100755 --- a/tests/qemu-iotests/050 +++ b/tests/qemu-iotests/050 @@ -24,7 +24,6 @@ owner=pbonzini@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 25d3b2d4785..a676da82734 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/052 b/tests/qemu-iotests/052 index 842eaced3b6..b992adf4ffd 100755 --- a/tests/qemu-iotests/052 +++ b/tests/qemu-iotests/052 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/053 b/tests/qemu-iotests/053 index 2a04f5f5516..afa109c950a 100755 --- a/tests/qemu-iotests/053 +++ b/tests/qemu-iotests/053 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/054 b/tests/qemu-iotests/054 index bf47ef9fac3..cf88a7c76e5 100755 --- a/tests/qemu-iotests/054 +++ b/tests/qemu-iotests/054 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058 index 5eb8784669e..0d741a7cac2 100755 --- a/tests/qemu-iotests/058 +++ b/tests/qemu-iotests/058 @@ -26,7 +26,6 @@ owner=xiawenc@linux.vnet.ibm.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index 530bbbe6ce4..54d5567accf 100755 --- a/tests/qemu-iotests/059 +++ b/tests/qemu-iotests/059 @@ -24,7 +24,6 @@ owner=famz@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 index 74ad371885d..af0588ae9a9 100755 --- a/tests/qemu-iotests/060 +++ b/tests/qemu-iotests/060 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061 index 911b6f28946..1a501634193 100755 --- a/tests/qemu-iotests/061 +++ b/tests/qemu-iotests/061 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/062 b/tests/qemu-iotests/062 index 051fb9f4100..985fbef41ea 100755 --- a/tests/qemu-iotests/062 +++ b/tests/qemu-iotests/062 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/063 b/tests/qemu-iotests/063 index adc037c1f55..041fb5c1ac7 100755 --- a/tests/qemu-iotests/063 +++ b/tests/qemu-iotests/063 @@ -25,7 +25,6 @@ owner=alex@alex.org.uk seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/064 b/tests/qemu-iotests/064 index 5792fbbc928..f55ff37ca73 100755 --- a/tests/qemu-iotests/064 +++ b/tests/qemu-iotests/064 @@ -24,7 +24,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/066 b/tests/qemu-iotests/066 index 86382177364..26c043711b9 100755 --- a/tests/qemu-iotests/066 +++ b/tests/qemu-iotests/066 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067 index fe259f61654..f8d584f4873 100755 --- a/tests/qemu-iotests/067 +++ b/tests/qemu-iotests/067 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! # get standard environment, filters and checks diff --git a/tests/qemu-iotests/068 b/tests/qemu-iotests/068 index e7fca6a4949..f0583d52ae3 100755 --- a/tests/qemu-iotests/068 +++ b/tests/qemu-iotests/068 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/069 b/tests/qemu-iotests/069 index 96e55ef2160..fdee121f43a 100755 --- a/tests/qemu-iotests/069 +++ b/tests/qemu-iotests/069 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/070 b/tests/qemu-iotests/070 index 8d08d74ff93..78e0390f5f3 100755 --- a/tests/qemu-iotests/070 +++ b/tests/qemu-iotests/070 @@ -25,7 +25,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/071 b/tests/qemu-iotests/071 index 48b495513f6..6448e9e75bc 100755 --- a/tests/qemu-iotests/071 +++ b/tests/qemu-iotests/071 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/072 b/tests/qemu-iotests/072 index aa027c7d293..08ef29f5b44 100755 --- a/tests/qemu-iotests/072 +++ b/tests/qemu-iotests/072 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/073 b/tests/qemu-iotests/073 index 40f85b18b97..5e7f76cb7f7 100755 --- a/tests/qemu-iotests/073 +++ b/tests/qemu-iotests/073 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/075 b/tests/qemu-iotests/075 index caa30d47434..45b8901ef01 100755 --- a/tests/qemu-iotests/075 +++ b/tests/qemu-iotests/075 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/076 b/tests/qemu-iotests/076 index ef9e6a4ff32..3b5ab3fd08a 100755 --- a/tests/qemu-iotests/076 +++ b/tests/qemu-iotests/076 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/077 b/tests/qemu-iotests/077 index b3c6fb13704..a40f319d371 100755 --- a/tests/qemu-iotests/077 +++ b/tests/qemu-iotests/077 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/078 b/tests/qemu-iotests/078 index a106c26f6b5..68d0ea88020 100755 --- a/tests/qemu-iotests/078 +++ b/tests/qemu-iotests/078 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/079 b/tests/qemu-iotests/079 index b2e3f7426ac..fca2f77d379 100755 --- a/tests/qemu-iotests/079 +++ b/tests/qemu-iotests/079 @@ -24,7 +24,6 @@ owner=hutao@cn.fujitsu.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/080 b/tests/qemu-iotests/080 index f0eb42f3909..cec2376f599 100755 --- a/tests/qemu-iotests/080 +++ b/tests/qemu-iotests/080 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index 9f1dece2711..ccb6becaef0 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -24,7 +24,6 @@ owner=benoit@irqsave.net seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/082 b/tests/qemu-iotests/082 index 3e605d52d1a..14f6631071d 100755 --- a/tests/qemu-iotests/082 +++ b/tests/qemu-iotests/082 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/083 b/tests/qemu-iotests/083 index 9f92317b0ac..89f67db70fc 100755 --- a/tests/qemu-iotests/083 +++ b/tests/qemu-iotests/083 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/084 b/tests/qemu-iotests/084 index 04f2aa9d7d1..e131fa96424 100755 --- a/tests/qemu-iotests/084 +++ b/tests/qemu-iotests/084 @@ -25,7 +25,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 index 5c7668cf9ba..2ef84077b8f 100755 --- a/tests/qemu-iotests/085 +++ b/tests/qemu-iotests/085 @@ -29,7 +29,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! snapshot_virt0="snapshot-v0.qcow2" diff --git a/tests/qemu-iotests/086 b/tests/qemu-iotests/086 index 84e38350719..971de7dc355 100755 --- a/tests/qemu-iotests/086 +++ b/tests/qemu-iotests/086 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087 index 2561a14456e..109cdf5ea43 100755 --- a/tests/qemu-iotests/087 +++ b/tests/qemu-iotests/087 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! # get standard environment, filters and checks diff --git a/tests/qemu-iotests/088 b/tests/qemu-iotests/088 index b8076f216b0..c5e9ab42c75 100755 --- a/tests/qemu-iotests/088 +++ b/tests/qemu-iotests/088 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/089 b/tests/qemu-iotests/089 index aa1ba4a98e7..3165d79e2ac 100755 --- a/tests/qemu-iotests/089 +++ b/tests/qemu-iotests/089 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/090 b/tests/qemu-iotests/090 index 7380503d57c..1450993e15e 100755 --- a/tests/qemu-iotests/090 +++ b/tests/qemu-iotests/090 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/091 b/tests/qemu-iotests/091 index 10ac4a8d73b..2f2f98ee64d 100755 --- a/tests/qemu-iotests/091 +++ b/tests/qemu-iotests/091 @@ -26,7 +26,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! MIG_FIFO="${TEST_DIR}/migrate" diff --git a/tests/qemu-iotests/092 b/tests/qemu-iotests/092 index 5bbdd071d8b..8e318f10b93 100755 --- a/tests/qemu-iotests/092 +++ b/tests/qemu-iotests/092 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094 index 9aa01e3627c..7adc9b91382 100755 --- a/tests/qemu-iotests/094 +++ b/tests/qemu-iotests/094 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095 index 72ecc22e1b7..9fc47f6b877 100755 --- a/tests/qemu-iotests/095 +++ b/tests/qemu-iotests/095 @@ -27,7 +27,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/097 b/tests/qemu-iotests/097 index e22670c8d06..7234b16053f 100755 --- a/tests/qemu-iotests/097 +++ b/tests/qemu-iotests/097 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/098 b/tests/qemu-iotests/098 index b002e969b32..c7977da99ac 100755 --- a/tests/qemu-iotests/098 +++ b/tests/qemu-iotests/098 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/099 b/tests/qemu-iotests/099 index caaf58eee54..4a6275d4bca 100755 --- a/tests/qemu-iotests/099 +++ b/tests/qemu-iotests/099 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/101 b/tests/qemu-iotests/101 index ea53f8b8d38..3001ba3c0ad 100755 --- a/tests/qemu-iotests/101 +++ b/tests/qemu-iotests/101 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/102 b/tests/qemu-iotests/102 index 04b3f284456..29a6a940e2a 100755 --- a/tests/qemu-iotests/102 +++ b/tests/qemu-iotests/102 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index 2841318492d..66f8167f028 100755 --- a/tests/qemu-iotests/103 +++ b/tests/qemu-iotests/103 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/104 b/tests/qemu-iotests/104 index 726d4670527..34bb0d23baf 100755 --- a/tests/qemu-iotests/104 +++ b/tests/qemu-iotests/104 @@ -24,7 +24,6 @@ owner=hutao@cn.fujitsu.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! trap "exit \$status" 0 1 2 3 15 diff --git a/tests/qemu-iotests/105 b/tests/qemu-iotests/105 index 3db4ce3cf3e..943bda2f4f2 100755 --- a/tests/qemu-iotests/105 +++ b/tests/qemu-iotests/105 @@ -24,7 +24,6 @@ owner=famz@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/106 b/tests/qemu-iotests/106 index 5e51f88a783..4129fee6bc9 100755 --- a/tests/qemu-iotests/106 +++ b/tests/qemu-iotests/106 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/107 b/tests/qemu-iotests/107 index d7222dc1c91..5d70ad20079 100755 --- a/tests/qemu-iotests/107 +++ b/tests/qemu-iotests/107 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108 index 2355d98c1d3..58e8ad7636e 100755 --- a/tests/qemu-iotests/108 +++ b/tests/qemu-iotests/108 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109 index acbd0791365..90bdae459b8 100755 --- a/tests/qemu-iotests/109 +++ b/tests/qemu-iotests/109 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/110 b/tests/qemu-iotests/110 index 9de7369f3ae..b64b3b215a1 100755 --- a/tests/qemu-iotests/110 +++ b/tests/qemu-iotests/110 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/111 b/tests/qemu-iotests/111 index a1c152d0c10..e15e66ac5d7 100755 --- a/tests/qemu-iotests/111 +++ b/tests/qemu-iotests/111 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index 28eb9aae93d..fba2965322d 100755 --- a/tests/qemu-iotests/112 +++ b/tests/qemu-iotests/112 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/113 b/tests/qemu-iotests/113 index 4e098109050..d8d78c46dcb 100755 --- a/tests/qemu-iotests/113 +++ b/tests/qemu-iotests/113 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/114 b/tests/qemu-iotests/114 index 5b7dc5496c8..e17fb514cb5 100755 --- a/tests/qemu-iotests/114 +++ b/tests/qemu-iotests/114 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/115 b/tests/qemu-iotests/115 index 665c2ead41b..0581e03c266 100755 --- a/tests/qemu-iotests/115 +++ b/tests/qemu-iotests/115 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/116 b/tests/qemu-iotests/116 index df0172fed3a..f8a27b9c02b 100755 --- a/tests/qemu-iotests/116 +++ b/tests/qemu-iotests/116 @@ -27,7 +27,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/117 b/tests/qemu-iotests/117 index 6c834611824..e533e230a3e 100755 --- a/tests/qemu-iotests/117 +++ b/tests/qemu-iotests/117 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/119 b/tests/qemu-iotests/119 index 4f34fb4343a..32810d52c9a 100755 --- a/tests/qemu-iotests/119 +++ b/tests/qemu-iotests/119 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/120 b/tests/qemu-iotests/120 index f40b97d0999..76afdf449bf 100755 --- a/tests/qemu-iotests/120 +++ b/tests/qemu-iotests/120 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/121 b/tests/qemu-iotests/121 index 6d6f55a5dcf..d2885c700f5 100755 --- a/tests/qemu-iotests/121 +++ b/tests/qemu-iotests/121 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/122 b/tests/qemu-iotests/122 index d8c8ad722dc..eab3399dd65 100755 --- a/tests/qemu-iotests/122 +++ b/tests/qemu-iotests/122 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/123 b/tests/qemu-iotests/123 index b18e3fca9a4..168b985c8b5 100755 --- a/tests/qemu-iotests/123 +++ b/tests/qemu-iotests/123 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/125 b/tests/qemu-iotests/125 index c20c71570c4..778c8749334 100755 --- a/tests/qemu-iotests/125 +++ b/tests/qemu-iotests/125 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/126 b/tests/qemu-iotests/126 index a2d4d6c73dc..91148383ad7 100755 --- a/tests/qemu-iotests/126 +++ b/tests/qemu-iotests/126 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! # get standard environment, filters and checks diff --git a/tests/qemu-iotests/127 b/tests/qemu-iotests/127 index 9e0d7d3be8b..c9139ed5e6c 100755 --- a/tests/qemu-iotests/127 +++ b/tests/qemu-iotests/127 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotests/128 index 0976a18133f..925f5c7e98a 100755 --- a/tests/qemu-iotests/128 +++ b/tests/qemu-iotests/128 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! devname="eiodev$$" diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130 index 2c4b94da1bf..f2f2706b285 100755 --- a/tests/qemu-iotests/130 +++ b/tests/qemu-iotests/130 @@ -26,7 +26,6 @@ owner=kwolf@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/131 b/tests/qemu-iotests/131 index 94a9ae76af6..58c25f7abe5 100755 --- a/tests/qemu-iotests/131 +++ b/tests/qemu-iotests/131 @@ -24,7 +24,6 @@ owner=den@openvz.org seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/133 b/tests/qemu-iotests/133 index af6b3e1dd4c..a9a47a3c36c 100755 --- a/tests/qemu-iotests/133 +++ b/tests/qemu-iotests/133 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134 index 99144151b82..cacabcd28b1 100755 --- a/tests/qemu-iotests/134 +++ b/tests/qemu-iotests/134 @@ -24,7 +24,6 @@ owner=berrange@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/135 b/tests/qemu-iotests/135 index ce608312f6d..a18a0c72309 100755 --- a/tests/qemu-iotests/135 +++ b/tests/qemu-iotests/135 @@ -24,7 +24,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index 19e8597306a..09cd4450ca5 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/138 b/tests/qemu-iotests/138 index 21650d8197f..eccbcae3a66 100755 --- a/tests/qemu-iotests/138 +++ b/tests/qemu-iotests/138 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140 index a8fc95145c4..d4623b5a5d5 100755 --- a/tests/qemu-iotests/140 +++ b/tests/qemu-iotests/140 @@ -28,7 +28,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/141 b/tests/qemu-iotests/141 index 4246d387a1b..e2408c79888 100755 --- a/tests/qemu-iotests/141 +++ b/tests/qemu-iotests/141 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/142 b/tests/qemu-iotests/142 index 1639c839853..c7c360d11b5 100755 --- a/tests/qemu-iotests/142 +++ b/tests/qemu-iotests/142 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/143 b/tests/qemu-iotests/143 index 5ff19445078..d6302cc06d8 100755 --- a/tests/qemu-iotests/143 +++ b/tests/qemu-iotests/143 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/144 b/tests/qemu-iotests/144 index 4b915718cd1..118c0999949 100755 --- a/tests/qemu-iotests/144 +++ b/tests/qemu-iotests/144 @@ -26,7 +26,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! TMP_SNAP1=${TEST_DIR}/tmp.qcow2 diff --git a/tests/qemu-iotests/145 b/tests/qemu-iotests/145 index c371b3c46a0..6ce8a46f92a 100755 --- a/tests/qemu-iotests/145 +++ b/tests/qemu-iotests/145 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146 index 043711be680..3f61351ffe4 100755 --- a/tests/qemu-iotests/146 +++ b/tests/qemu-iotests/146 @@ -24,7 +24,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/150 b/tests/qemu-iotests/150 index ee8f6375f69..955b877efa1 100755 --- a/tests/qemu-iotests/150 +++ b/tests/qemu-iotests/150 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index 0daeb1b0058..00092b84b9f 100755 --- a/tests/qemu-iotests/153 +++ b/tests/qemu-iotests/153 @@ -24,7 +24,6 @@ owner=famz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" tmp=/tmp/$$ status=1 # failure is the default! diff --git a/tests/qemu-iotests/154 b/tests/qemu-iotests/154 index fde03b0dc8c..4a4abf05890 100755 --- a/tests/qemu-iotests/154 +++ b/tests/qemu-iotests/154 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156 index 0a9a09802e1..f97f96f6668 100755 --- a/tests/qemu-iotests/156 +++ b/tests/qemu-iotests/156 @@ -32,7 +32,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/157 b/tests/qemu-iotests/157 index 2bf02be465c..c3231b787a1 100755 --- a/tests/qemu-iotests/157 +++ b/tests/qemu-iotests/157 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/158 b/tests/qemu-iotests/158 index 24ac600a4a4..d277ddcc943 100755 --- a/tests/qemu-iotests/158 +++ b/tests/qemu-iotests/158 @@ -24,7 +24,6 @@ owner=berrange@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/159 b/tests/qemu-iotests/159 index 9b0e1ecc90d..e74b2739dea 100755 --- a/tests/qemu-iotests/159 +++ b/tests/qemu-iotests/159 @@ -23,7 +23,6 @@ owner=fullmanet@gmail.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 _cleanup() diff --git a/tests/qemu-iotests/160 b/tests/qemu-iotests/160 index 5c910e5bfc1..92fff45d104 100755 --- a/tests/qemu-iotests/160 +++ b/tests/qemu-iotests/160 @@ -23,7 +23,6 @@ owner=fullmanet@gmail.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 _cleanup() diff --git a/tests/qemu-iotests/162 b/tests/qemu-iotests/162 index 477a8063604..ef02d844a20 100755 --- a/tests/qemu-iotests/162 +++ b/tests/qemu-iotests/162 @@ -25,7 +25,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/170 b/tests/qemu-iotests/170 index b79359fc4e4..861eabf5cc0 100755 --- a/tests/qemu-iotests/170 +++ b/tests/qemu-iotests/170 @@ -23,7 +23,6 @@ owner=fullmanet@gmail.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 _cleanup() diff --git a/tests/qemu-iotests/171 b/tests/qemu-iotests/171 index bcfaaf1be25..5b46069fded 100755 --- a/tests/qemu-iotests/171 +++ b/tests/qemu-iotests/171 @@ -25,7 +25,6 @@ owner=tgolembi@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/172 b/tests/qemu-iotests/172 index 02c5f79bab8..c5ee33ee81b 100755 --- a/tests/qemu-iotests/172 +++ b/tests/qemu-iotests/172 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/173 b/tests/qemu-iotests/173 index bdaa092979e..1fe8c5d7381 100755 --- a/tests/qemu-iotests/173 +++ b/tests/qemu-iotests/173 @@ -24,7 +24,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/174 b/tests/qemu-iotests/174 index 552879db322..d8bb05c4e21 100755 --- a/tests/qemu-iotests/174 +++ b/tests/qemu-iotests/174 @@ -24,7 +24,6 @@ owner=nirsof@gmail.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/175 b/tests/qemu-iotests/175 index ca56e827cde..ebbeb6e74cd 100755 --- a/tests/qemu-iotests/175 +++ b/tests/qemu-iotests/175 @@ -24,7 +24,6 @@ owner=nirsof@gmail.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/176 b/tests/qemu-iotests/176 index 32baa116dd0..c091d0bd1e0 100755 --- a/tests/qemu-iotests/176 +++ b/tests/qemu-iotests/176 @@ -29,7 +29,6 @@ owner=mreitz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/177 b/tests/qemu-iotests/177 index 396986da894..7bf8e1daf39 100755 --- a/tests/qemu-iotests/177 +++ b/tests/qemu-iotests/177 @@ -24,7 +24,6 @@ owner=eblake@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/178 b/tests/qemu-iotests/178 index 6af52c653a7..3f4b4a45642 100755 --- a/tests/qemu-iotests/178 +++ b/tests/qemu-iotests/178 @@ -24,7 +24,6 @@ owner=stefanha@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/179 b/tests/qemu-iotests/179 index 115944a7532..30406316364 100755 --- a/tests/qemu-iotests/179 +++ b/tests/qemu-iotests/179 @@ -24,7 +24,6 @@ owner=eblake@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181 index e02979378da..0c44108dac1 100755 --- a/tests/qemu-iotests/181 +++ b/tests/qemu-iotests/181 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! MIG_SOCKET="${TEST_DIR}/migrate" diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 3b7689c1d5c..9e078c5484d 100755 --- a/tests/qemu-iotests/182 +++ b/tests/qemu-iotests/182 @@ -24,7 +24,6 @@ owner=famz@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" tmp=/tmp/$$ status=1 # failure is the default! diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183 index c49e1ad6efb..ebb5e304ac7 100755 --- a/tests/qemu-iotests/183 +++ b/tests/qemu-iotests/183 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! MIG_SOCKET="${TEST_DIR}/migrate" diff --git a/tests/qemu-iotests/184 b/tests/qemu-iotests/184 index 2b68284d58f..2f3259d5587 100755 --- a/tests/qemu-iotests/184 +++ b/tests/qemu-iotests/184 @@ -24,7 +24,6 @@ owner="Manos Pitsidianakis" seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! trap "exit \$status" 0 1 2 3 15 diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185 index 7dcfdeac605..d8f1505cd83 100755 --- a/tests/qemu-iotests/185 +++ b/tests/qemu-iotests/185 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 0aa4395a57a..29681bf45c6 100755 --- a/tests/qemu-iotests/186 +++ b/tests/qemu-iotests/186 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/187 b/tests/qemu-iotests/187 index 7bb783363c3..1feddca5081 100755 --- a/tests/qemu-iotests/187 +++ b/tests/qemu-iotests/187 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/188 b/tests/qemu-iotests/188 index 83ed03e33ee..af40e496eed 100755 --- a/tests/qemu-iotests/188 +++ b/tests/qemu-iotests/188 @@ -24,7 +24,6 @@ owner=berrange@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/189 b/tests/qemu-iotests/189 index e6954757226..222bec133b6 100755 --- a/tests/qemu-iotests/189 +++ b/tests/qemu-iotests/189 @@ -24,7 +24,6 @@ owner=berrange@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/190 b/tests/qemu-iotests/190 index 8f808fef5d9..95ba06d8f48 100755 --- a/tests/qemu-iotests/190 +++ b/tests/qemu-iotests/190 @@ -24,7 +24,6 @@ owner=eblake@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/191 b/tests/qemu-iotests/191 index d6860e72f7c..198272ea3b0 100755 --- a/tests/qemu-iotests/191 +++ b/tests/qemu-iotests/191 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192 index 595f0d786ab..415c706db54 100755 --- a/tests/qemu-iotests/192 +++ b/tests/qemu-iotests/192 @@ -25,7 +25,6 @@ owner=famz@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/195 b/tests/qemu-iotests/195 index e7a403ded2f..f56f2557153 100755 --- a/tests/qemu-iotests/195 +++ b/tests/qemu-iotests/195 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197 index 0369aa5cff0..8170f5d4ab1 100755 --- a/tests/qemu-iotests/197 +++ b/tests/qemu-iotests/197 @@ -24,7 +24,6 @@ owner=eblake@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! # get standard environment, filters and checks diff --git a/tests/qemu-iotests/198 b/tests/qemu-iotests/198 index 54eaaf51534..4d961f4f3a5 100755 --- a/tests/qemu-iotests/198 +++ b/tests/qemu-iotests/198 @@ -24,7 +24,6 @@ owner=berrange@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/200 b/tests/qemu-iotests/200 index ddbdedc476f..b9ebd5a8c77 100755 --- a/tests/qemu-iotests/200 +++ b/tests/qemu-iotests/200 @@ -26,7 +26,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/204 b/tests/qemu-iotests/204 index feb69d2ada6..57f3afe1d73 100755 --- a/tests/qemu-iotests/204 +++ b/tests/qemu-iotests/204 @@ -24,7 +24,6 @@ owner=eblake@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/214 b/tests/qemu-iotests/214 index c46ca2a6dde..7a2d5391bb7 100755 --- a/tests/qemu-iotests/214 +++ b/tests/qemu-iotests/214 @@ -22,7 +22,6 @@ seq=$(basename "$0") echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/215 b/tests/qemu-iotests/215 index 2e616ed659b..230fd2551a5 100755 --- a/tests/qemu-iotests/215 +++ b/tests/qemu-iotests/215 @@ -21,7 +21,6 @@ seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! # get standard environment, filters and checks diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221 index 41c4e4bdf88..06f48f1f23d 100755 --- a/tests/qemu-iotests/221 +++ b/tests/qemu-iotests/221 @@ -21,7 +21,6 @@ seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 index 8b1859c2dd3..58a3f3ff408 100755 --- a/tests/qemu-iotests/223 +++ b/tests/qemu-iotests/223 @@ -21,7 +21,6 @@ seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/225 b/tests/qemu-iotests/225 index f2ee715685f..e42ee94ff01 100755 --- a/tests/qemu-iotests/225 +++ b/tests/qemu-iotests/225 @@ -24,7 +24,6 @@ owner=mreitz@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/226 b/tests/qemu-iotests/226 index 8ec3e612ddb..aec413b23c4 100755 --- a/tests/qemu-iotests/226 +++ b/tests/qemu-iotests/226 @@ -25,7 +25,6 @@ owner=jsnow@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/227 b/tests/qemu-iotests/227 index 9a5f7f9f148..43f2323ff2c 100755 --- a/tests/qemu-iotests/227 +++ b/tests/qemu-iotests/227 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=$(basename $0) echo "QA output created by $seq" -here=$PWD status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/229 b/tests/qemu-iotests/229 index ff851ec431f..86602437fff 100755 --- a/tests/qemu-iotests/229 +++ b/tests/qemu-iotests/229 @@ -25,7 +25,6 @@ owner=jcody@redhat.com seq="$(basename $0)" echo "QA output created by $seq" -here="$PWD" status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/231 b/tests/qemu-iotests/231 index 3e283708b4c..e9f8aaacd34 100755 --- a/tests/qemu-iotests/231 +++ b/tests/qemu-iotests/231 @@ -26,7 +26,6 @@ owner=jcody@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232 index bc2972d1248..b125e54093d 100755 --- a/tests/qemu-iotests/232 +++ b/tests/qemu-iotests/232 @@ -24,7 +24,6 @@ owner=kwolf@redhat.com seq=`basename $0` echo "QA output created by $seq" -here=`pwd` status=1 # failure is the default! _cleanup() From patchwork Mon Nov 19 17:54:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000016 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGj813DJz9s0n for ; Tue, 20 Nov 2018 04:55:56 +1100 (AEDT) Received: from localhost ([::1]:58311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnm5-0000bJ-KU for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:55:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnkw-0008UC-Bf for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnkv-0002Tm-5E for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33270) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnks-0002PP-Fo; Mon, 19 Nov 2018 12:54:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D34D658E24; Mon, 19 Nov 2018 17:54:37 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93DEF5C70B; Mon, 19 Nov 2018 17:54:36 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:17 -0600 Message-Id: <20181119175427.2298497-3-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 19 Nov 2018 17:54:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 02/12] qemu-iotests: convert `pwd` and $(pwd) to $PWD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, "open list:Block layer core" , Mao Zhongyi , mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mao Zhongyi POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. Thus, it is smarter to avoid forking the pwd executable for something that is already available in the environment. So replace it with the following: sed -i 's/\(`pwd`\|\$(pwd)\)/$PWD/g' $(git grep -l pwd) Then delete a pointless line assigning PWD to itself. Cc: kwolf@redhat.com Cc: mreitz@redhat.com Cc: eblake@redhat.com Suggested-by: Eric Blake Signed-off-by: Mao Zhongyi Message-Id: <20181024094051.4470-2-maozhongyi@cmss.chinamobile.com> Reviewed-by: Eric Blake [eblake: touch up commit message, reorder series, tweak a couple more files] Signed-off-by: Eric Blake --- configure | 2 +- tests/qemu-iotests/common.config | 2 -- tests/qemu-iotests/common.rc | 2 +- scripts/coccinelle/tcg_gen_extract.cocci | 2 +- tests/check-block.sh | 6 +++--- tests/qemu-iotests/check | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 5b1d83ea262..0a3c6a72c3b 100755 --- a/configure +++ b/configure @@ -878,7 +878,7 @@ Linux) vhost_crypto="yes" vhost_scsi="yes" vhost_vsock="yes" - QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES" + QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES" supported_os="yes" libudev="yes" ;; diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config index 102aa6878a9..3cda0fe5696 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -25,8 +25,6 @@ HOSTOS=`uname -s` arch=`uname -m` [[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch" -export PWD=`pwd` - # make sure we have a standard umask umask 022 diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 70ca65b49b3..e15e7a7c8e6 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -160,7 +160,7 @@ fi ORIG_TEST_IMG="$TEST_IMG" if [ -z "$TEST_DIR" ]; then - TEST_DIR=`pwd`/scratch + TEST_DIR=$PWD/scratch fi QEMU_TEST_DIR="${TEST_DIR}" diff --git a/scripts/coccinelle/tcg_gen_extract.cocci b/scripts/coccinelle/tcg_gen_extract.cocci index 81e66a35ae1..c10c8634827 100644 --- a/scripts/coccinelle/tcg_gen_extract.cocci +++ b/scripts/coccinelle/tcg_gen_extract.cocci @@ -17,7 +17,7 @@ // --keep-comments --in-place \ // --use-gitgrep --dir target // -// $ docker run --rm -v `pwd`:`pwd` -w `pwd` philmd/coccinelle \ +// $ docker run --rm -v $PWD:$PWD -w $PWD philmd/coccinelle \ // --macro-file scripts/cocci-macro-file.h \ // --sp-file scripts/coccinelle/tcg_gen_extract.cocci \ // --keep-comments --in-place \ diff --git a/tests/check-block.sh b/tests/check-block.sh index c3de3789c48..f3d12fd602d 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -5,9 +5,9 @@ if [ "$#" -ne 0 ]; then FORMAT_LIST="$@" fi -export QEMU_PROG="$(pwd)/x86_64-softmmu/qemu-system-x86_64" -export QEMU_IMG_PROG="$(pwd)/qemu-img" -export QEMU_IO_PROG="$(pwd)/qemu-io" +export QEMU_PROG="$PWD/x86_64-softmmu/qemu-system-x86_64" +export QEMU_IMG_PROG="$PWD/qemu-img" +export QEMU_IO_PROG="$PWD/qemu-io" if [ ! -x $QEMU_PROG ]; then echo "'make check-block' requires qemu-system-x86_64" diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index aa94c6c7ea9..b37713277d1 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -99,7 +99,7 @@ set_prog_path() } if [ -z "$TEST_DIR" ]; then - TEST_DIR=`pwd`/scratch + TEST_DIR=$PWD/scratch fi if [ ! -e "$TEST_DIR" ]; then From patchwork Mon Nov 19 17:54:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000015 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGj25WWnz9s0n for ; Tue, 20 Nov 2018 04:55:50 +1100 (AEDT) Received: from localhost ([::1]:58309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnm0-0000T3-9i for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:55:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnl0-00007C-90 for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnkx-0002Wx-Cb for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57432) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnkt-0002RJ-Nq; Mon, 19 Nov 2018 12:54:39 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13909307D844; Mon, 19 Nov 2018 17:54:39 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19E685C70B; Mon, 19 Nov 2018 17:54:37 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:18 -0600 Message-Id: <20181119175427.2298497-4-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 19 Nov 2018 17:54:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/12] qemu-iotests: Modern shell scripting (use $() instead of ``) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, "open list:Block layer core" , Mao Zhongyi , mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mao Zhongyi Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. For now, just do the qemu-iotests directory. Cc: kwolf@redhat.com Cc: mreitz@redhat.com Cc: eblake@redhat.com Suggested-by: Eric Blake Signed-off-by: Mao Zhongyi Message-Id: <20181024094051.4470-4-maozhongyi@cmss.chinamobile.com> Reviewed-by: Eric Blake [eblake: tweak commit message] Signed-off-by: Eric Blake --- tests/qemu-iotests/common.config | 4 +-- tests/qemu-iotests/check | 60 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config index 3cda0fe5696..9f460f203da 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -21,8 +21,8 @@ export LANG=C PATH=".:$PATH" -HOSTOS=`uname -s` -arch=`uname -m` +HOSTOS=$(uname -s) +arch=$(uname -m) [[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch" # make sure we have a standard umask diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index b37713277d1..89ed275988a 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -80,17 +80,17 @@ _full_imgfmt_details() _full_platform_details() { - os=`uname -s` - host=`hostname -s` - kernel=`uname -r` - platform=`uname -m` + os=$(uname -s) + host=$(hostname -s) + kernel=$(uname -r) + platform=$(uname -m) echo "$os/$platform $host $kernel" } # $1 = prog to look for set_prog_path() { - p=`command -v $1 2> /dev/null` + p=$(command -v $1 2> /dev/null) if [ -n "$p" -a -x "$p" ]; then type -p "$p" else @@ -147,9 +147,9 @@ do if $group then # arg after -g - group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ + group_list=$(sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ s/ .*//p -}'` +}') if [ -z "$group_list" ] then echo "Group \"$r\" is empty or not defined?" @@ -173,9 +173,9 @@ s/ .*//p # arg after -x # Populate $tmp.list with all tests awk '/^[0-9]{3,}/ {print $1}' "${source_iotests}/group" > $tmp.list 2>/dev/null - group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ + group_list=$(sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ s/ .*//p -}'` +}') if [ -z "$group_list" ] then echo "Group \"$r\" is empty or not defined?" @@ -193,7 +193,7 @@ s/ .*//p rm -f $tmp.sed fi echo "/^$t\$/d" >>$tmp.sed - numsed=`expr $numsed + 1` + numsed=$(expr $numsed + 1) done sed -f $tmp.sed <$tmp.list >$tmp.tmp mv $tmp.tmp $tmp.list @@ -433,12 +433,12 @@ testlist options ;; [0-9]*-[0-9]*) - eval `echo $r | sed -e 's/^/start=/' -e 's/-/ end=/'` + eval $(echo $r | sed -e 's/^/start=/' -e 's/-/ end=/') ;; [0-9]*-) - eval `echo $r | sed -e 's/^/start=/' -e 's/-//'` - end=`echo [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] | sed -e 's/\[0-9]//g' -e 's/ *$//' -e 's/.* //'` + eval $(echo $r | sed -e 's/^/start=/' -e 's/-//') + end=$(echo [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] | sed -e 's/\[0-9]//g' -e 's/ *$//' -e 's/.* //') if [ -z "$end" ] then echo "No tests in range \"$r\"?" @@ -455,8 +455,8 @@ testlist options esac # get rid of leading 0s as can be interpreted as octal - start=`echo $start | sed 's/^0*//'` - end=`echo $end | sed 's/^0*//'` + start=$(echo $start | sed 's/^0*//') + end=$(echo $end | sed 's/^0*//') if $xpand then @@ -531,7 +531,7 @@ fi # should be sort -n, but this did not work for Linux when this # was ported from IRIX # -list=`sort $tmp.list` +list=$(sort $tmp.list) rm -f $tmp.list $tmp.tmp $tmp.sed if [ -z "$QEMU_PROG" ] @@ -590,7 +590,7 @@ fi export QEMU_NBD_PROG="$(type -p "$QEMU_NBD_PROG")" if [ -z "$QEMU_VXHS_PROG" ]; then - export QEMU_VXHS_PROG="`set_prog_path qnio_server`" + export QEMU_VXHS_PROG="$(set_prog_path qnio_server)" fi if [ -x "$build_iotests/socket_scm_helper" ] @@ -616,7 +616,7 @@ _wallclock() _timestamp() { - now=`date "+%T"` + now=$(date "+%T") printf %s " [$now]" } @@ -642,9 +642,9 @@ END { if (NR > 0) { if [ -f $tmp.expunged ] then - notrun=`wc -l <$tmp.expunged | sed -e 's/ *//g'` - try=`expr $try - $notrun` - list=`echo "$list" | sed -f $tmp.expunged` + notrun=$(wc -l <$tmp.expunged | sed -e 's/ *//g') + try=$(expr $try - $notrun) + list=$(echo "$list" | sed -f $tmp.expunged) fi echo "" >>check.log @@ -682,8 +682,8 @@ trap "_wrapup; exit \$status" 0 1 2 3 15 [ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE -FULL_IMGFMT_DETAILS=`_full_imgfmt_details` -FULL_HOST_DETAILS=`_full_platform_details` +FULL_IMGFMT_DETAILS=$(_full_imgfmt_details) +FULL_HOST_DETAILS=$(_full_platform_details) cat <>$tmp.time + echo "$seq $(expr $stop - $start)" >>$tmp.time fi else echo " - output mismatch (see $seq.out.bad)" @@ -824,14 +824,14 @@ do if $err then bad="$bad $seq" - n_bad=`expr $n_bad + 1` + n_bad=$(expr $n_bad + 1) quick=false fi - [ -f $seq.notrun ] || try=`expr $try + 1` + [ -f $seq.notrun ] || try=$(expr $try + 1) seq="after_$seq" done interrupt=false -status=`expr $n_bad` +status=$(expr $n_bad) exit From patchwork Mon Nov 19 17:54:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGms4kcMz9s3Z for ; Tue, 20 Nov 2018 04:59:09 +1100 (AEDT) Received: from localhost ([::1]:58331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnpC-0003si-Nv for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:59:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnkx-0008VW-Ky for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnkw-0002WB-Kz for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnku-0002SL-Iv; Mon, 19 Nov 2018 12:54:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3AA7307C943; Mon, 19 Nov 2018 17:54:39 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CC6C5C57B; Mon, 19 Nov 2018 17:54:39 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:19 -0600 Message-Id: <20181119175427.2298497-5-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 19 Nov 2018 17:54:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/12] nbd: fix whitespace in server error message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:Network Block Dev..." Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé A space was missing after the option number was printed: Option 0x8not permitted before TLS becomes Option 0x8 not permitted before TLS This fixes commit 3668328303429f3bc93ab3365c66331600b06a2d Author: Eric Blake Date: Fri Oct 14 13:33:09 2016 -0500 nbd: Send message along with server NBD_REP_ERR errors Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-2-berrange@redhat.com> Reviewed-by: Eric Blake [eblake: move lone space to next line] Signed-off-by: Eric Blake --- nbd/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbd/server.c b/nbd/server.c index 4e8f5ae51b0..056cfa5ad47 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1136,7 +1136,7 @@ static int nbd_negotiate_options(NBDClient *client, uint16_t myflags, default: ret = nbd_opt_drop(client, NBD_REP_ERR_TLS_REQD, errp, "Option 0x%" PRIx32 - "not permitted before TLS", option); + " not permitted before TLS", option); /* Let the client keep trying, unless they asked to * quit. In this mode, we've already sent an error, so * we can't ack the abort. */ From patchwork Mon Nov 19 17:54:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000022 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGm75d5nz9s3C for ; Tue, 20 Nov 2018 04:58:31 +1100 (AEDT) Received: from localhost ([::1]:58322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnoa-00039U-Rl for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:58:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnl0-00007A-8X for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnkx-0002Xr-R3 for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42176) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnkv-0002TR-Bp; Mon, 19 Nov 2018 12:54:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A49F881DFA; Mon, 19 Nov 2018 17:54:40 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28CE65C231; Mon, 19 Nov 2018 17:54:40 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:20 -0600 Message-Id: <20181119175427.2298497-6-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 19 Nov 2018 17:54:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 05/12] nbd/server: Ignore write errors when replying to NBD_OPT_ABORT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:Network Block Dev..." Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit 37ec36f6 intentionally ignores errors when trying to reply to an NBD_OPT_ABORT request for plaintext clients, but did not make the same change for a TLS server. Since NBD_OPT_ABORT is documented as being a potential for an EPIPE when the client hangs up without waiting for our reply, we don't need to pollute the server's output with that failure. Signed-off-by: Eric Blake Message-Id: <20181117223221.2198751-1-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé --- nbd/server.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index 056cfa5ad47..dc04513de70 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1134,12 +1134,16 @@ static int nbd_negotiate_options(NBDClient *client, uint16_t myflags, return -EINVAL; default: - ret = nbd_opt_drop(client, NBD_REP_ERR_TLS_REQD, errp, + /* Let the client keep trying, unless they asked to + * quit. Always try to give an error back to the + * client; but when replying to OPT_ABORT, be aware + * that the client may hang up before receiving the + * error, in which case we are fine ignoring the + * resulting EPIPE. */ + ret = nbd_opt_drop(client, NBD_REP_ERR_TLS_REQD, + option == NBD_OPT_ABORT ? NULL : errp, "Option 0x%" PRIx32 " not permitted before TLS", option); - /* Let the client keep trying, unless they asked to - * quit. In this mode, we've already sent an error, so - * we can't ack the abort. */ if (option == NBD_OPT_ABORT) { return 1; } From patchwork Mon Nov 19 17:54:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGhs3wNgz9s0n for ; Tue, 20 Nov 2018 04:55:41 +1100 (AEDT) Received: from localhost ([::1]:58308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnlq-0000Kx-QW for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:55:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnkx-0008Vv-Vv for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnkw-0002Vd-Cn for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41254) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnkw-0002U8-2A for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:42 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 690253082E52 for ; Mon, 19 Nov 2018 17:54:41 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFE265C231; Mon, 19 Nov 2018 17:54:40 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:21 -0600 Message-Id: <20181119175427.2298497-7-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 19 Nov 2018 17:54:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/12] io: return 0 for EOF in TLS session read after shutdown X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé GNUTLS takes a paranoid approach when seeing 0 bytes returned by the underlying OS read() function. It will consider this an error and return GNUTLS_E_PREMATURE_TERMINATION instead of propagating the 0 return value. It expects apps to arrange for clean termination at the protocol level and not rely on seeing EOF from a read call to detect shutdown. This is to harden apps against a malicious 3rd party causing termination of the sockets layer. This is unhelpful for the QEMU NBD code which does have a clean protocol level shutdown, but still relies on seeing 0 from the I/O channel read in the coroutine handling incoming replies. The upshot is that when using a plain NBD connection shutdown is silent, but when using TLS, the client spams the console with Cannot read from TLS channel: Broken pipe The NBD connection has, however, called qio_channel_shutdown() at this point to indicate that it is done with I/O. This gives the opportunity to optimize the code such that when the channel has been shutdown in the read direction, the error code GNUTLS_E_PREMATURE_TERMINATION gets turned into a '0' return instead of an error. Signed-off-by: Daniel P. Berrangé Message-Id: <20181119134228.11031-1-berrange@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- include/io/channel-tls.h | 1 + include/io/channel.h | 6 +++--- crypto/tlssession.c | 3 +++ io/channel-tls.c | 5 +++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/io/channel-tls.h b/include/io/channel-tls.h index 87fcaf91463..fdbdf12feb1 100644 --- a/include/io/channel-tls.h +++ b/include/io/channel-tls.h @@ -48,6 +48,7 @@ struct QIOChannelTLS { QIOChannel parent; QIOChannel *master; QCryptoTLSSession *session; + QIOChannelShutdown shutdown; }; /** diff --git a/include/io/channel.h b/include/io/channel.h index e8cdadb0b07..da2f1382002 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -51,9 +51,9 @@ enum QIOChannelFeature { typedef enum QIOChannelShutdown QIOChannelShutdown; enum QIOChannelShutdown { - QIO_CHANNEL_SHUTDOWN_BOTH, - QIO_CHANNEL_SHUTDOWN_READ, - QIO_CHANNEL_SHUTDOWN_WRITE, + QIO_CHANNEL_SHUTDOWN_READ = 1, + QIO_CHANNEL_SHUTDOWN_WRITE = 2, + QIO_CHANNEL_SHUTDOWN_BOTH = 3, }; typedef gboolean (*QIOChannelFunc)(QIOChannel *ioc, diff --git a/crypto/tlssession.c b/crypto/tlssession.c index 2f28fa7f71b..0dedd4af526 100644 --- a/crypto/tlssession.c +++ b/crypto/tlssession.c @@ -473,6 +473,9 @@ qcrypto_tls_session_read(QCryptoTLSSession *session, case GNUTLS_E_INTERRUPTED: errno = EINTR; break; + case GNUTLS_E_PREMATURE_TERMINATION: + errno = ECONNABORTED; + break; default: errno = EIO; break; diff --git a/io/channel-tls.c b/io/channel-tls.c index 9628e6fa479..c98ead21b01 100644 --- a/io/channel-tls.c +++ b/io/channel-tls.c @@ -275,6 +275,9 @@ static ssize_t qio_channel_tls_readv(QIOChannel *ioc, } else { return QIO_CHANNEL_ERR_BLOCK; } + } else if (errno == ECONNABORTED && + (tioc->shutdown & QIO_CHANNEL_SHUTDOWN_READ)) { + return 0; } error_setg_errno(errp, errno, @@ -357,6 +360,8 @@ static int qio_channel_tls_shutdown(QIOChannel *ioc, { QIOChannelTLS *tioc = QIO_CHANNEL_TLS(ioc); + tioc->shutdown |= how; + return qio_channel_shutdown(tioc->master, how, errp); } From patchwork Mon Nov 19 17:54:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGrw68t6z9s0n for ; Tue, 20 Nov 2018 05:02:40 +1100 (AEDT) Received: from localhost ([::1]:58359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnsc-0006c7-HO for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 13:02:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnl2-0000Dm-Kh for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnl1-0002cP-F6 for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53760) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnkx-0002WS-AB; Mon, 19 Nov 2018 12:54:43 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A7223001921; Mon, 19 Nov 2018 17:54:42 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4DB65C231; Mon, 19 Nov 2018 17:54:41 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:22 -0600 Message-Id: <20181119175427.2298497-8-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 19 Nov 2018 17:54:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 07/12] tests: pull qemu-nbd iotest helpers into common.nbd file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé The helpers for starting/stopping qemu-nbd in 058 will be useful in other test cases, so move them into a common.nbd file. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-4-berrange@redhat.com> Reviewed-by: Eric Blake [eblake: fix shell quoting] Signed-off-by: Eric Blake --- tests/qemu-iotests/common.nbd | 56 +++++++++++++++++++++++++++++++++++ tests/qemu-iotests/058 | 47 +++++------------------------ 2 files changed, 64 insertions(+), 39 deletions(-) create mode 100644 tests/qemu-iotests/common.nbd diff --git a/tests/qemu-iotests/common.nbd b/tests/qemu-iotests/common.nbd new file mode 100644 index 00000000000..27357f3151d --- /dev/null +++ b/tests/qemu-iotests/common.nbd @@ -0,0 +1,56 @@ +#!/bin/bash +# -*- shell-script-mode -*- +# +# Helpers for NBD server related config +# +# Copyright (C) 2018 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +nbd_unix_socket="${TEST_DIR}/qemu-nbd.sock" +nbd_pid_file="${TEST_DIR}/qemu-nbd.pid" + +function nbd_server_stop() +{ + local NBD_PID + if [ -f "$nbd_pid_file" ]; then + read NBD_PID < "$nbd_pid_file" + rm -f "$nbd_pid_file" + if [ -n "$NBD_PID" ]; then + kill "$NBD_PID" + fi + fi + rm -f "$nbd_unix_socket" +} + +function nbd_server_wait_for_unix_socket() +{ + for ((i = 0; i < 300; i++)) + do + if [ -r "$nbd_unix_socket" ]; then + return + fi + sleep 0.1 + done + echo "Failed in check of unix socket created by qemu-nbd" + exit 1 +} + +function nbd_server_start_unix_socket() +{ + nbd_server_stop + $QEMU_NBD -v -t -k "$nbd_unix_socket" "$@" & + nbd_server_wait_for_unix_socket +} diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058 index 0d741a7cac2..d6d4f94d5d2 100755 --- a/tests/qemu-iotests/058 +++ b/tests/qemu-iotests/058 @@ -28,55 +28,19 @@ echo "QA output created by $seq" status=1 # failure is the default! -nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket -nbd_snapshot_img="nbd:unix:$nbd_unix_socket" -rm -f "${TEST_DIR}/qemu-nbd.pid" - -_cleanup_nbd() -{ - local NBD_SNAPSHOT_PID - if [ -f "${TEST_DIR}/qemu-nbd.pid" ]; then - read NBD_SNAPSHOT_PID < "${TEST_DIR}/qemu-nbd.pid" - rm -f "${TEST_DIR}/qemu-nbd.pid" - if [ -n "$NBD_SNAPSHOT_PID" ]; then - kill "$NBD_SNAPSHOT_PID" - fi - fi - rm -f "$nbd_unix_socket" -} - -_wait_for_nbd() -{ - for ((i = 0; i < 300; i++)) - do - if [ -r "$nbd_unix_socket" ]; then - return - fi - sleep 0.1 - done - echo "Failed in check of unix socket created by qemu-nbd" - exit 1 -} - -converted_image=$TEST_IMG.converted - _export_nbd_snapshot() { - _cleanup_nbd - $QEMU_NBD -v -t -k "$nbd_unix_socket" "$TEST_IMG" -l $1 & - _wait_for_nbd + nbd_server_start_unix_socket "$TEST_IMG" -l $1 } _export_nbd_snapshot1() { - _cleanup_nbd - $QEMU_NBD -v -t -k "$nbd_unix_socket" "$TEST_IMG" -l snapshot.name=$1 & - _wait_for_nbd + nbd_server_start_unix_socket "$TEST_IMG" -l snapshot.name=$1 } _cleanup() { - _cleanup_nbd + nbd_server_stop _cleanup_test_img rm -f "$converted_image" } @@ -86,6 +50,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.rc . ./common.filter . ./common.pattern +. ./common.nbd _supported_fmt qcow2 _supported_proto file @@ -94,6 +59,10 @@ _require_command QEMU_NBD # Internal snapshots are (currently) impossible with refcount_bits=1 _unsupported_imgopts 'refcount_bits=1[^0-9]' +nbd_snapshot_img="nbd:unix:$nbd_unix_socket" + +converted_image=$TEST_IMG.converted + # Use -f raw instead of -f $IMGFMT for the NBD connection QEMU_IO_NBD="$QEMU_IO -f raw --cache=$CACHEMODE" From patchwork Mon Nov 19 17:54:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGmf3Xggz9s0n for ; Tue, 20 Nov 2018 04:58:58 +1100 (AEDT) Received: from localhost ([::1]:58330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnp2-0003kZ-1H for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:58:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnl1-00008x-T2 for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnl1-0002cA-6S for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnky-0002Xa-8r; Mon, 19 Nov 2018 12:54:44 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 992F983F40; Mon, 19 Nov 2018 17:54:43 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB1055886C; Mon, 19 Nov 2018 17:54:42 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:23 -0600 Message-Id: <20181119175427.2298497-9-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 19 Nov 2018 17:54:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 08/12] tests: check if qemu-nbd is still alive before waiting X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit and then check again repeatedly for up to 30 seconds. This is pointless if the qemu-nbd process has quit due to an error, so check whether the pid is still alive before waiting and retrying. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-5-berrange@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- tests/qemu-iotests/common.nbd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.nbd b/tests/qemu-iotests/common.nbd index 27357f3151d..9f841ab4029 100644 --- a/tests/qemu-iotests/common.nbd +++ b/tests/qemu-iotests/common.nbd @@ -37,11 +37,19 @@ function nbd_server_stop() function nbd_server_wait_for_unix_socket() { + pid=$1 + for ((i = 0; i < 300; i++)) do if [ -r "$nbd_unix_socket" ]; then return fi + kill -s 0 $pid 2>/dev/null + if test $? != 0 + then + echo "qemu-nbd unexpectedly quit" + exit 1 + fi sleep 0.1 done echo "Failed in check of unix socket created by qemu-nbd" @@ -52,5 +60,5 @@ function nbd_server_start_unix_socket() { nbd_server_stop $QEMU_NBD -v -t -k "$nbd_unix_socket" "$@" & - nbd_server_wait_for_unix_socket + nbd_server_wait_for_unix_socket $! } From patchwork Mon Nov 19 17:54:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000029 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGr01fvzz9s3Z for ; Tue, 20 Nov 2018 05:01:51 +1100 (AEDT) Received: from localhost ([::1]:58346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnrl-0005vX-Ae for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 13:01:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnl3-0000J4-Fn for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnl2-0002d4-6K for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41272) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnkz-0002Za-Ck; Mon, 19 Nov 2018 12:54:45 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BBB353082E63; Mon, 19 Nov 2018 17:54:44 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id D10025C70B; Mon, 19 Nov 2018 17:54:43 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:24 -0600 Message-Id: <20181119175427.2298497-10-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 19 Nov 2018 17:54:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 09/12] tests: add iotests helpers for dealing with TLS certificates X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé Add helpers to common.tls for creating TLS certificates for a CA, server and client. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-6-berrange@redhat.com> Reviewed-by: Eric Blake [eblake: spelling and quoting touchups] Signed-off-by: Eric Blake --- tests/qemu-iotests/common.tls | 137 ++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 tests/qemu-iotests/common.tls diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls new file mode 100644 index 00000000000..cecab269ec6 --- /dev/null +++ b/tests/qemu-iotests/common.tls @@ -0,0 +1,137 @@ +#!/bin/bash +# +# Helpers for TLS related config +# +# Copyright (C) 2018 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +tls_dir="${TEST_DIR}/tls" + +function tls_x509_cleanup() +{ + rm -f "${tls_dir}"/*.pem + rm -f "${tls_dir}"/*/*.pem + rmdir "${tls_dir}"/* + rmdir "${tls_dir}" +} + + +function tls_x509_init() +{ + mkdir -p "${tls_dir}" + + # use a fixed key so we don't waste system entropy on + # each test run + cat > "${tls_dir}/key.pem" < "${tls_dir}/ca.info" <&1 | head -1 + + rm -f "${tls_dir}/ca.info" +} + + +function tls_x509_create_server() +{ + caname=$1 + name=$2 + + mkdir -p "${tls_dir}/$name" + cat > "${tls_dir}/cert.info" <&1 | head -1 + ln -s "${tls_dir}/$caname-cert.pem" "${tls_dir}/$name/ca-cert.pem" + ln -s "${tls_dir}/key.pem" "${tls_dir}/$name/server-key.pem" + + rm -f "${tls_dir}/cert.info" +} + + +function tls_x509_create_client() +{ + caname=$1 + name=$2 + + mkdir -p "${tls_dir}/$name" + cat > "${tls_dir}/cert.info" <&1 | head -1 + ln -s "${tls_dir}/$caname-cert.pem" "${tls_dir}/$name/ca-cert.pem" + ln -s "${tls_dir}/key.pem" "${tls_dir}/$name/client-key.pem" + + rm -f "${tls_dir}/cert.info" +} From patchwork Mon Nov 19 17:54:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGmc48k5z9s0n for ; Tue, 20 Nov 2018 04:58:56 +1100 (AEDT) Received: from localhost ([::1]:58328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnoz-0003iu-Ue for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 12:58:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnlA-0000Rf-LM for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnl9-0002mW-3L for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46210) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnl3-0002eL-E6; Mon, 19 Nov 2018 12:54:49 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C567D394D58; Mon, 19 Nov 2018 17:54:48 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDE9E5C70B; Mon, 19 Nov 2018 17:54:44 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:25 -0600 Message-Id: <20181119175427.2298497-11-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 19 Nov 2018 17:54:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/12] tests: exercise NBD server in TLS mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé Add tests that validate it is possible to connect to an NBD server running TLS mode. Also test mis-matched TLS vs non-TLS connections correctly fail. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-7-berrange@redhat.com> Reviewed-by: Eric Blake Tested-by: Eric Blake [eblake: rebase to iotests shell cleanups, use ss instead of socat for port probing, sanitize port number in expected output] Signed-off-by: Eric Blake --- tests/qemu-iotests/common.nbd | 45 +++++++++++++++ tests/qemu-iotests/233 | 102 ++++++++++++++++++++++++++++++++++ tests/qemu-iotests/233.out | 30 ++++++++++ tests/qemu-iotests/group | 1 + 4 files changed, 178 insertions(+) create mode 100755 tests/qemu-iotests/233 create mode 100644 tests/qemu-iotests/233.out diff --git a/tests/qemu-iotests/common.nbd b/tests/qemu-iotests/common.nbd index 9f841ab4029..0f4497a7ea5 100644 --- a/tests/qemu-iotests/common.nbd +++ b/tests/qemu-iotests/common.nbd @@ -20,6 +20,7 @@ # nbd_unix_socket="${TEST_DIR}/qemu-nbd.sock" +nbd_tcp_addr="127.0.0.1" nbd_pid_file="${TEST_DIR}/qemu-nbd.pid" function nbd_server_stop() @@ -62,3 +63,47 @@ function nbd_server_start_unix_socket() $QEMU_NBD -v -t -k "$nbd_unix_socket" "$@" & nbd_server_wait_for_unix_socket $! } + +function nbd_server_set_tcp_port() +{ + (ss --help) >/dev/null 2>&1 || _notrun "ss utility not found, skipping test" + + for ((port = 10809; port <= 10909; port++)) + do + if ! ss -tln | grep -sqE ":$port\b"; then + nbd_tcp_port=$port + return + fi + done + + echo "Cannot find free TCP port for nbd in range 10809-10909" + exit 1 +} + +function nbd_server_wait_for_tcp_socket() +{ + pid=$1 + + for ((i = 0; i < 300; i++)) + do + if ss -tln | grep -sqE ":$nbd_tcp_port\b"; then + return + fi + kill -s 0 $pid 2>/dev/null + if test $? != 0 + then + echo "qemu-nbd unexpectedly quit" + exit 1 + fi + sleep 0.1 + done + echo "Failed in check of TCP socket created by qemu-nbd" + exit 1 +} + +function nbd_server_start_tcp_socket() +{ + nbd_server_stop + $QEMU_NBD -v -t -b $nbd_tcp_addr -p $nbd_tcp_port "$@" & + nbd_server_wait_for_tcp_socket $! +} diff --git a/tests/qemu-iotests/233 b/tests/qemu-iotests/233 new file mode 100755 index 00000000000..46013cefdcd --- /dev/null +++ b/tests/qemu-iotests/233 @@ -0,0 +1,102 @@ +#!/bin/bash +# +# Test NBD TLS certificate / authorization integration +# +# Copyright (C) 2018 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# creator +owner=berrange@redhat.com + +seq=$(basename $0) +echo "QA output created by $seq" + +status=1 # failure is the default! + +_cleanup() +{ + nbd_server_stop + _cleanup_test_img + tls_x509_cleanup +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter +. ./common.pattern +. ./common.tls +. ./common.nbd + +_supported_fmt raw qcow2 +_supported_proto file +# If porting to non-Linux, consider using socat instead of ss in common.nbd +_supported_os Linux +_require_command QEMU_NBD + +nbd_server_set_tcp_port +tls_x509_init + +echo +echo "== preparing TLS creds ==" + +tls_x509_create_root_ca "ca1" +tls_x509_create_root_ca "ca2" +tls_x509_create_server "ca1" "server1" +tls_x509_create_client "ca1" "client1" +tls_x509_create_client "ca2" "client2" + +echo +echo "== preparing image ==" +_make_test_img 64M + + +echo +echo "== check TLS client to plain server fails ==" +nbd_server_start_tcp_socket "$TEST_IMG" + +$QEMU_IMG info --image-opts \ + --object tls-creds-x509,dir=${tls_dir}/client1,endpoint=client,id=tls0 \ + driver=nbd,host=$nbd_tcp_addr,port=$nbd_tcp_port,tls-creds=tls0 \ + 2>&1 | sed "s/$nbd_tcp_port/PORT/g" + +nbd_server_stop + +echo +echo "== check plain client to TLS server fails ==" + +nbd_server_start_tcp_socket --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=yes --tls-creds tls0 "$TEST_IMG" + +$QEMU_IMG info nbd://localhost:$nbd_tcp_port 2>&1 | sed "s/$nbd_tcp_port/PORT/g" + +echo +echo "== check TLS works ==" +$QEMU_IMG info --image-opts \ + --object tls-creds-x509,dir=${tls_dir}/client1,endpoint=client,id=tls0 \ + driver=nbd,host=$nbd_tcp_addr,port=$nbd_tcp_port,tls-creds=tls0 \ + 2>&1 | sed "s/$nbd_tcp_port/PORT/g" + +echo +echo "== check TLS with different CA fails ==" +$QEMU_IMG info --image-opts \ + --object tls-creds-x509,dir=${tls_dir}/client2,endpoint=client,id=tls0 \ + driver=nbd,host=$nbd_tcp_addr,port=$nbd_tcp_port,tls-creds=tls0 \ + 2>&1 | sed "s/$nbd_tcp_port/PORT/g" + +# success, all done +echo "*** done" +rm -f $seq.full +status=0 diff --git a/tests/qemu-iotests/233.out b/tests/qemu-iotests/233.out new file mode 100644 index 00000000000..616e9238c89 --- /dev/null +++ b/tests/qemu-iotests/233.out @@ -0,0 +1,30 @@ +QA output created by 233 + +== preparing TLS creds == +Generating a self signed certificate... +Generating a self signed certificate... +Generating a signed certificate... +Generating a signed certificate... +Generating a signed certificate... + +== preparing image == +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 + +== check TLS client to plain server fails == +qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Denied by server for option 5 (starttls) +server reported: TLS not configured + +== check plain client to TLS server fails == +qemu-img: Could not open 'nbd://localhost:PORT': TLS negotiation required before option 8 (structured reply) +server reported: Option 0x8 not permitted before TLS + +== check TLS works == +image: nbd://127.0.0.1:PORT +file format: nbd +virtual size: 64M (67108864 bytes) +disk size: unavailable + +== check TLS with different CA fails == +option negotiation failed: Verify failed: No certificate was found. +qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': The certificate hasn't got a known issuer +*** done diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 4d194716f28..2722103381e 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -229,3 +229,4 @@ 229 auto quick 231 auto quick 232 auto quick +233 auto quick From patchwork Mon Nov 19 17:54:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000034 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGy36HSXz9s3C for ; Tue, 20 Nov 2018 05:07:07 +1100 (AEDT) Received: from localhost ([::1]:58390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnwv-0001pl-Gu for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 13:07:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnlA-0000Qm-4y for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnl9-0002mV-2z for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:54:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37514) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnl4-0002fo-Dv; Mon, 19 Nov 2018 12:54:50 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C25A68831A; Mon, 19 Nov 2018 17:54:49 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AF3F5C57B; Mon, 19 Nov 2018 17:54:48 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:26 -0600 Message-Id: <20181119175427.2298497-12-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 19 Nov 2018 17:54:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 11/12] iotests: Also test I/O over NBD TLS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Enhance test 233 to also perform I/O beyond the initial handshake. Signed-off-by: Eric Blake Message-Id: <20181118022403.2211483-1-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/233 | 12 +++++++++++- tests/qemu-iotests/233.out | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/233 b/tests/qemu-iotests/233 index 46013cefdcd..a4da60d0ade 100755 --- a/tests/qemu-iotests/233 +++ b/tests/qemu-iotests/233 @@ -62,7 +62,7 @@ tls_x509_create_client "ca2" "client2" echo echo "== preparing image ==" _make_test_img 64M - +$QEMU_IO -c 'w -P 0x11 1m 1m' "$TEST_IMG" | _filter_qemu_io echo echo "== check TLS client to plain server fails ==" @@ -96,6 +96,16 @@ $QEMU_IMG info --image-opts \ driver=nbd,host=$nbd_tcp_addr,port=$nbd_tcp_port,tls-creds=tls0 \ 2>&1 | sed "s/$nbd_tcp_port/PORT/g" +echo +echo "== perform I/O over TLS ==" +QEMU_IO_OPTIONS=$QEMU_IO_OPTIONS_NO_FMT +$QEMU_IO -c 'r -P 0x11 1m 1m' -c 'w -P 0x22 1m 1m' --image-opts \ + --object tls-creds-x509,dir=${tls_dir}/client1,endpoint=client,id=tls0 \ + driver=nbd,host=$nbd_tcp_addr,port=$nbd_tcp_port,tls-creds=tls0 \ + 2>&1 | _filter_qemu_io + +$QEMU_IO -f qcow2 -r -U -c 'r -P 0x22 1m 1m' "$TEST_IMG" | _filter_qemu_io + # success, all done echo "*** done" rm -f $seq.full diff --git a/tests/qemu-iotests/233.out b/tests/qemu-iotests/233.out index 616e9238c89..94acd9b9479 100644 --- a/tests/qemu-iotests/233.out +++ b/tests/qemu-iotests/233.out @@ -9,6 +9,8 @@ Generating a signed certificate... == preparing image == Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 +wrote 1048576/1048576 bytes at offset 1048576 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) == check TLS client to plain server fails == qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Denied by server for option 5 (starttls) @@ -27,4 +29,12 @@ disk size: unavailable == check TLS with different CA fails == option negotiation failed: Verify failed: No certificate was found. qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': The certificate hasn't got a known issuer + +== perform I/O over TLS == +read 1048576/1048576 bytes at offset 1048576 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1048576/1048576 bytes at offset 1048576 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 1048576/1048576 bytes at offset 1048576 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** done From patchwork Mon Nov 19 17:54:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 1000030 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zGrb6dv6z9s3C for ; Tue, 20 Nov 2018 05:02:23 +1100 (AEDT) Received: from localhost ([::1]:58357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnsL-0006KL-Dk for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2018 13:02:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOnlF-0000Vy-4p for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:55:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOnlC-0002qn-DR for qemu-devel@nongnu.org; Mon, 19 Nov 2018 12:55:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40840) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOnl5-0002hY-NO; Mon, 19 Nov 2018 12:54:51 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0892230832D3; Mon, 19 Nov 2018 17:54:51 +0000 (UTC) Received: from red.redhat.com (ovpn-121-142.rdu2.redhat.com [10.10.121.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31F405C224; Mon, 19 Nov 2018 17:54:50 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2018 11:54:27 -0600 Message-Id: <20181119175427.2298497-13-eblake@redhat.com> In-Reply-To: <20181119175427.2298497-1-eblake@redhat.com> References: <20181119175427.2298497-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 19 Nov 2018 17:54:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 12/12] iotests: Drop use of bash keyword 'function' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Bash allows functions to be declared with or without the leading keyword 'function'; but including the keyword does not comply with POSIX syntax, and is confusing to ksh users where the use of the keyword changes the scoping rules for functions. Stick to the POSIX form through iotests. Done mechanically with: sed -i 's/^function //' $(git ls-files tests/qemu-iotests) Signed-off-by: Eric Blake Message-Id: <20181116215002.2124581-1-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- tests/qemu-iotests/common.nbd | 12 ++++++------ tests/qemu-iotests/common.pattern | 16 ++++++++-------- tests/qemu-iotests/common.qemu | 8 ++++---- tests/qemu-iotests/common.tls | 10 +++++----- tests/qemu-iotests/035 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 6 +++--- tests/qemu-iotests/046 | 6 +++--- tests/qemu-iotests/047 | 2 +- tests/qemu-iotests/049 | 4 ++-- tests/qemu-iotests/051 | 4 ++-- tests/qemu-iotests/067 | 4 ++-- tests/qemu-iotests/071 | 4 ++-- tests/qemu-iotests/077 | 4 ++-- tests/qemu-iotests/081 | 4 ++-- tests/qemu-iotests/082 | 2 +- tests/qemu-iotests/085 | 10 +++++----- tests/qemu-iotests/086 | 2 +- tests/qemu-iotests/087 | 6 +++--- tests/qemu-iotests/099 | 6 +++--- tests/qemu-iotests/109 | 2 +- tests/qemu-iotests/112 | 2 +- tests/qemu-iotests/142 | 8 ++++---- tests/qemu-iotests/153 | 4 ++-- tests/qemu-iotests/157 | 4 ++-- tests/qemu-iotests/172 | 6 +++--- tests/qemu-iotests/176 | 2 +- tests/qemu-iotests/177 | 2 +- tests/qemu-iotests/184 | 4 ++-- tests/qemu-iotests/186 | 4 ++-- tests/qemu-iotests/195 | 4 ++-- tests/qemu-iotests/204 | 2 +- tests/qemu-iotests/223 | 4 ++-- tests/qemu-iotests/227 | 4 ++-- tests/qemu-iotests/232 | 6 +++--- 35 files changed, 86 insertions(+), 86 deletions(-) diff --git a/tests/qemu-iotests/common.nbd b/tests/qemu-iotests/common.nbd index 0f4497a7ea5..233187a25cc 100644 --- a/tests/qemu-iotests/common.nbd +++ b/tests/qemu-iotests/common.nbd @@ -23,7 +23,7 @@ nbd_unix_socket="${TEST_DIR}/qemu-nbd.sock" nbd_tcp_addr="127.0.0.1" nbd_pid_file="${TEST_DIR}/qemu-nbd.pid" -function nbd_server_stop() +nbd_server_stop() { local NBD_PID if [ -f "$nbd_pid_file" ]; then @@ -36,7 +36,7 @@ function nbd_server_stop() rm -f "$nbd_unix_socket" } -function nbd_server_wait_for_unix_socket() +nbd_server_wait_for_unix_socket() { pid=$1 @@ -57,14 +57,14 @@ function nbd_server_wait_for_unix_socket() exit 1 } -function nbd_server_start_unix_socket() +nbd_server_start_unix_socket() { nbd_server_stop $QEMU_NBD -v -t -k "$nbd_unix_socket" "$@" & nbd_server_wait_for_unix_socket $! } -function nbd_server_set_tcp_port() +nbd_server_set_tcp_port() { (ss --help) >/dev/null 2>&1 || _notrun "ss utility not found, skipping test" @@ -80,7 +80,7 @@ function nbd_server_set_tcp_port() exit 1 } -function nbd_server_wait_for_tcp_socket() +nbd_server_wait_for_tcp_socket() { pid=$1 @@ -101,7 +101,7 @@ function nbd_server_wait_for_tcp_socket() exit 1 } -function nbd_server_start_tcp_socket() +nbd_server_start_tcp_socket() { nbd_server_stop $QEMU_NBD -v -t -b $nbd_tcp_addr -p $nbd_tcp_port "$@" & diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern index 34f4a8dc9b4..b67bb341360 100644 --- a/tests/qemu-iotests/common.pattern +++ b/tests/qemu-iotests/common.pattern @@ -16,7 +16,7 @@ # along with this program. If not, see . # -function do_is_allocated() { +do_is_allocated() { local start=$1 local size=$2 local step=$3 @@ -27,11 +27,11 @@ function do_is_allocated() { done } -function is_allocated() { +is_allocated() { do_is_allocated "$@" | $QEMU_IO "$TEST_IMG" | _filter_qemu_io } -function do_io() { +do_io() { local op=$1 local start=$2 local size=$3 @@ -45,22 +45,22 @@ function do_io() { done } -function io_pattern() { +io_pattern() { do_io "$@" | $QEMU_IO "$TEST_IMG" | _filter_qemu_io } -function io() { +io() { local start=$2 local pattern=$(( (start >> 9) % 256 )) do_io "$@" $pattern | $QEMU_IO "$TEST_IMG" | _filter_qemu_io } -function io_zero() { +io_zero() { do_io "$@" 0 | $QEMU_IO "$TEST_IMG" | _filter_qemu_io } -function io_test() { +io_test() { local op=$1 local offset=$2 local cluster_size=$3 @@ -100,7 +100,7 @@ function io_test() { offset=$((offset + num_large * ( l2_size + half_cluster ))) } -function io_test2() { +io_test2() { local orig_offset=$1 local cluster_size=$2 local num=$3 diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index dadde2a266c..7c87b897fa3 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -60,7 +60,7 @@ _in_fd=4 # $3: A string to search for in the response; if found, this indicates # failure and the test is either aborted (if $qemu_error_no_exit # is not set) or ${QEMU_STATUS[$1]} is set to -1 (otherwise). -function _timed_wait_for() +_timed_wait_for() { local h=${1} shift @@ -131,7 +131,7 @@ function _timed_wait_for() # strings the response will be scanned for. The first of the two # indicates success, the latter indicates failure. Failure is handled # like a timeout. -function _send_qemu_cmd() +_send_qemu_cmd() { local h=${1} local count=1 @@ -186,7 +186,7 @@ function _send_qemu_cmd() # Returns: # $QEMU_HANDLE: set to a handle value to communicate with this QEMU instance. # -function _launch_qemu() +_launch_qemu() { local comm= local fifo_out= @@ -262,7 +262,7 @@ function _launch_qemu() # If $wait is set to anything other than the empty string, the process will not # be killed but only waited for, and any output will be forwarded to stdout. If # $wait is empty, the process will be killed and all output will be suppressed. -function _cleanup_qemu() +_cleanup_qemu() { # QEMU_PID[], QEMU_IN[], QEMU_OUT[] all use same indices for i in "${!QEMU_OUT[@]}" diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls index cecab269ec6..39f17c1b999 100644 --- a/tests/qemu-iotests/common.tls +++ b/tests/qemu-iotests/common.tls @@ -20,7 +20,7 @@ tls_dir="${TEST_DIR}/tls" -function tls_x509_cleanup() +tls_x509_cleanup() { rm -f "${tls_dir}"/*.pem rm -f "${tls_dir}"/*/*.pem @@ -29,7 +29,7 @@ function tls_x509_cleanup() } -function tls_x509_init() +tls_x509_init() { mkdir -p "${tls_dir}" @@ -58,7 +58,7 @@ EOF } -function tls_x509_create_root_ca() +tls_x509_create_root_ca() { name=${1:-ca-cert} @@ -77,7 +77,7 @@ EOF } -function tls_x509_create_server() +tls_x509_create_server() { caname=$1 name=$2 @@ -108,7 +108,7 @@ EOF } -function tls_x509_create_client() +tls_x509_create_client() { caname=$1 name=$2 diff --git a/tests/qemu-iotests/035 b/tests/qemu-iotests/035 index a5716caf327..85d9ef7f8e1 100755 --- a/tests/qemu-iotests/035 +++ b/tests/qemu-iotests/035 @@ -49,7 +49,7 @@ echo echo "creating image" _make_test_img $size -function generate_requests() { +generate_requests() { for i in $(seq 0 63); do echo "aio_write ${i}M 512" echo "aio_write ${i}M 512" diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037 index 2e43b19ed04..a11992dad20 100755 --- a/tests/qemu-iotests/037 +++ b/tests/qemu-iotests/037 @@ -54,7 +54,7 @@ TEST_IMG="$TEST_IMG.base" _make_test_img $size -function backing_io() +backing_io() { local offset=$1 local sectors=$2 diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038 index 4e03976023d..575093e8cfd 100755 --- a/tests/qemu-iotests/038 +++ b/tests/qemu-iotests/038 @@ -51,7 +51,7 @@ TEST_IMG="$TEST_IMG.base" _make_test_img $size -function backing_io() +backing_io() { local offset=$1 local sectors=$2 @@ -76,7 +76,7 @@ _make_test_img -b "$TEST_IMG.base" 6G echo echo "== Some concurrent requests touching the same cluster ==" -function overlay_io() +overlay_io() { # Start with a request touching two clusters echo aio_write -P 0x80 2020k 80k @@ -102,7 +102,7 @@ overlay_io | $QEMU_IO "$TEST_IMG" | _filter_qemu_io |\ echo echo "== Verify image content ==" -function verify_io() +verify_io() { echo read -P 31 2016k 4k echo read -P 0x80 2020k 80k diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index 01c0de62d82..5e41d96daa1 100755 --- a/tests/qemu-iotests/046 +++ b/tests/qemu-iotests/046 @@ -48,7 +48,7 @@ echo "== creating backing file for COW tests ==" _make_test_img $size -function backing_io() +backing_io() { local offset=$1 local sectors=$2 @@ -73,7 +73,7 @@ _make_test_img -b "$TEST_IMG.base" 6G echo echo "== Some concurrent requests touching the same cluster ==" -function overlay_io() +overlay_io() { # Allocate middle of cluster 1, then write to somewhere before and after it cat < /dev/null); then # For v2 images, discarded clusters are read from the backing file diff --git a/tests/qemu-iotests/047 b/tests/qemu-iotests/047 index c168373cf0f..6e776d2ce5c 100755 --- a/tests/qemu-iotests/047 +++ b/tests/qemu-iotests/047 @@ -45,7 +45,7 @@ size=128M _make_test_img $size -function qemu_io_cmds() +qemu_io_cmds() { cat <&1 | filter_test_dir diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index a676da82734..32741d7efdf 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -43,7 +43,7 @@ _supported_os Linux # other than refcount_bits=16 _unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" ( @@ -57,7 +57,7 @@ function do_run_qemu() echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_generated_node_ids | _filter_hmp diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067 index f8d584f4873..342b2b0a309 100755 --- a/tests/qemu-iotests/067 +++ b/tests/qemu-iotests/067 @@ -36,7 +36,7 @@ _supported_os Linux # Because anything other than 16 would change the output of query-block _unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" $QEMU -nographic -qmp-pretty stdio -serial none "$@" @@ -52,7 +52,7 @@ _filter_qmp_events() | tr '\t' '\n' } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp | _filter_qemu \ | _filter_actual_image_size \ diff --git a/tests/qemu-iotests/071 b/tests/qemu-iotests/071 index 6448e9e75bc..6e467dc1da1 100755 --- a/tests/qemu-iotests/071 +++ b/tests/qemu-iotests/071 @@ -40,14 +40,14 @@ _supported_fmt qcow2 _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" | _filter_imgfmt $QEMU -nographic -qmp stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp | _filter_qemu_io } diff --git a/tests/qemu-iotests/077 b/tests/qemu-iotests/077 index a40f319d371..58fe8932b30 100755 --- a/tests/qemu-iotests/077 +++ b/tests/qemu-iotests/077 @@ -48,7 +48,7 @@ _make_test_img $size echo echo "== Some concurrent requests involving RMW ==" -function test_io() +test_io() { echo "open -o driver=$IMGFMT,file.align=4k blkdebug::$TEST_IMG" # A simple RMW request @@ -193,7 +193,7 @@ test_io | $QEMU_IO | _filter_qemu_io | \ echo echo "== Verify image content ==" -function verify_io() +verify_io() { # A simple RMW request echo read -P 0 0 0x200 diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index ccb6becaef0..edf6e6172aa 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -42,14 +42,14 @@ _supported_fmt raw _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" | _filter_imgfmt $QEMU -nographic -qmp stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp\ | _filter_qemu_io | _filter_generated_node_ids diff --git a/tests/qemu-iotests/082 b/tests/qemu-iotests/082 index 14f6631071d..61eec63797c 100755 --- a/tests/qemu-iotests/082 +++ b/tests/qemu-iotests/082 @@ -40,7 +40,7 @@ _supported_fmt qcow2 _supported_proto file nfs _supported_os Linux -function run_qemu_img() +run_qemu_img() { echo echo Testing: "$@" | _filter_testdir diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 index 2ef84077b8f..ade68ef853b 100755 --- a/tests/qemu-iotests/085 +++ b/tests/qemu-iotests/085 @@ -60,7 +60,7 @@ _supported_os Linux # ${1}: unique identifier for the snapshot filename -function create_single_snapshot() +create_single_snapshot() { cmd="{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', @@ -70,7 +70,7 @@ function create_single_snapshot() } # ${1}: unique identifier for the snapshot filename -function create_group_snapshot() +create_group_snapshot() { cmd="{ 'execute': 'transaction', 'arguments': {'actions': [ @@ -88,7 +88,7 @@ function create_group_snapshot() # ${1}: unique identifier for the snapshot filename # ${2}: extra_params to the blockdev-add command # ${3}: filename -function do_blockdev_add() +do_blockdev_add() { cmd="{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'qcow2', 'node-name': 'snap_${1}', ${2} @@ -99,7 +99,7 @@ function do_blockdev_add() } # ${1}: unique identifier for the snapshot filename -function add_snapshot_image() +add_snapshot_image() { base_image="${TEST_DIR}/$((${1}-1))-${snapshot_virt0}" snapshot_file="${TEST_DIR}/${1}-${snapshot_virt0}" @@ -110,7 +110,7 @@ function add_snapshot_image() # ${1}: unique identifier for the snapshot filename # ${2}: expected response, defaults to 'return' -function blockdev_snapshot() +blockdev_snapshot() { cmd="{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', diff --git a/tests/qemu-iotests/086 b/tests/qemu-iotests/086 index 971de7dc355..3cca3687ea8 100755 --- a/tests/qemu-iotests/086 +++ b/tests/qemu-iotests/086 @@ -40,7 +40,7 @@ _supported_fmt qcow2 raw _supported_proto file _supported_os Linux -function run_qemu_img() +run_qemu_img() { echo echo Testing: "$@" | _filter_testdir diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087 index 109cdf5ea43..f6258870822 100755 --- a/tests/qemu-iotests/087 +++ b/tests/qemu-iotests/087 @@ -34,14 +34,14 @@ _supported_fmt qcow2 _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" $QEMU -nographic -qmp stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ | _filter_qemu | _filter_imgfmt \ @@ -102,7 +102,7 @@ echo === aio=native without O_DIRECT === echo # Skip this test if AIO is not enabled in this build -function run_qemu_filter_aio() +run_qemu_filter_aio() { run_qemu "$@" | \ sed -e 's/is not supported in this build/it requires cache.direct=on, which was not specified/' diff --git a/tests/qemu-iotests/099 b/tests/qemu-iotests/099 index 4a6275d4bca..578808b7474 100755 --- a/tests/qemu-iotests/099 +++ b/tests/qemu-iotests/099 @@ -45,12 +45,12 @@ _supported_os Linux _unsupported_imgopts "subformat=monolithicFlat" "subformat=twoGbMaxExtentFlat" \ "subformat=twoGbMaxExtentSparse" -function do_run_qemu() +do_run_qemu() { $QEMU -nographic -qmp stdio -serial none "$@" } -function run_qemu() +run_qemu() { # Get the "file": "foo" entry ($foo may only contain escaped double quotes, # which is how we can extract it) @@ -59,7 +59,7 @@ function run_qemu() | sed -e 's/^.*"file": "\(\(\\"\|[^"]\)*\)".*$/\1/' -e 's/\\"/"/g' } -function test_qemu() +test_qemu() { run_qemu -drive "if=none,id=drv0,$1" <&1 | _filter_testdir | _filter_qemu | _filter_hmp } @@ -88,7 +88,7 @@ echo files="if=none,file=$TEST_IMG,backing.file.filename=$TEST_IMG.base" ids="node-name=image,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file" -function check_cache_all() +check_cache_all() { # cache.direct is supposed to be inherited by both bs->file and # bs->backing @@ -231,7 +231,7 @@ drv_bk="if=none,file=json:{'driver':'$IMGFMT',,'file':'backing-file',,'node-name drv_file="if=none,driver=file,filename=$TEST_IMG,node-name=file" drv_img="if=none,id=blk,file=json:{'driver':'$IMGFMT',,'file':'file',,'backing':'backing',,'node-name':'image'}" -function check_cache_all_separate() +check_cache_all_separate() { # Check cache.direct diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index 00092b84b9f..3120a61da47 100755 --- a/tests/qemu-iotests/153 +++ b/tests/qemu-iotests/153 @@ -70,7 +70,7 @@ _run_cmd() (echo "$@"; "$@" 2>&1 1>/dev/null) | _filter_testdir } -function _do_run_qemu() +_do_run_qemu() { ( if ! test -t 0; then @@ -82,7 +82,7 @@ function _do_run_qemu() ) | $QEMU -nographic -monitor stdio -serial none "$@" 1>/dev/null } -function _run_qemu_with_images() +_run_qemu_with_images() { _do_run_qemu \ $(for i in $@; do echo "-drive if=none,file=$i"; done) 2>&1 \ diff --git a/tests/qemu-iotests/157 b/tests/qemu-iotests/157 index c3231b787a1..6fb26596ada 100755 --- a/tests/qemu-iotests/157 +++ b/tests/qemu-iotests/157 @@ -40,7 +40,7 @@ _supported_fmt generic _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { ( if ! test -t 0; then @@ -53,7 +53,7 @@ function do_run_qemu() echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_imgfmt \ | _filter_qemu | _filter_generated_node_ids diff --git a/tests/qemu-iotests/172 b/tests/qemu-iotests/172 index c5ee33ee81b..1e60a7e3d68 100755 --- a/tests/qemu-iotests/172 +++ b/tests/qemu-iotests/172 @@ -46,7 +46,7 @@ if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then _notrun "Requires a PC machine" fi -function do_run_qemu() +do_run_qemu() { ( if ! test -t 0; then @@ -59,7 +59,7 @@ function do_run_qemu() echo } -function check_floppy_qtree() +check_floppy_qtree() { echo echo Testing: "$@" | _filter_testdir @@ -75,7 +75,7 @@ function check_floppy_qtree() _filter_win32 | _filter_qemu } -function check_cache_mode() +check_cache_mode() { echo "info block none0" | QEMU_OPTIONS="" do_run_qemu -drive if=none,file="$TEST_IMG" "$@" | diff --git a/tests/qemu-iotests/176 b/tests/qemu-iotests/176 index c091d0bd1e0..4ecd5894a39 100755 --- a/tests/qemu-iotests/176 +++ b/tests/qemu-iotests/176 @@ -50,7 +50,7 @@ _supported_os Linux # Persistent dirty bitmaps require compat=1.1 _unsupported_imgopts 'compat=0.10' -function run_qemu() +run_qemu() { $QEMU -nographic -qmp stdio -serial none "$@" 2>&1 \ | _filter_testdir | _filter_qmp | _filter_qemu \ diff --git a/tests/qemu-iotests/177 b/tests/qemu-iotests/177 index 7bf8e1daf39..f0c1155e807 100755 --- a/tests/qemu-iotests/177 +++ b/tests/qemu-iotests/177 @@ -85,7 +85,7 @@ $QEMU_IO -c "open -o $options,$limits blkdebug::$TEST_IMG" \ echo echo "== verify image content ==" -function verify_io() +verify_io() { if ($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "compat: 0.10" > /dev/null); then diff --git a/tests/qemu-iotests/184 b/tests/qemu-iotests/184 index 2f3259d5587..0af7a73aca1 100755 --- a/tests/qemu-iotests/184 +++ b/tests/qemu-iotests/184 @@ -34,14 +34,14 @@ trap "exit \$status" 0 1 2 3 15 _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" | _filter_imgfmt $QEMU -nographic -qmp-pretty stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp\ | _filter_qemu_io | _filter_generated_node_ids \ diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 29681bf45c6..c27dc953b6f 100755 --- a/tests/qemu-iotests/186 +++ b/tests/qemu-iotests/186 @@ -44,7 +44,7 @@ if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then _notrun "Requires a PC machine" fi -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" @@ -59,7 +59,7 @@ function do_run_qemu() echo } -function check_info_block() +check_info_block() { echo "info block" | do_run_qemu "$@" | _filter_win32 | _filter_hmp | _filter_qemu | diff --git a/tests/qemu-iotests/195 b/tests/qemu-iotests/195 index f56f2557153..a977c9798e3 100755 --- a/tests/qemu-iotests/195 +++ b/tests/qemu-iotests/195 @@ -41,14 +41,14 @@ _supported_fmt qcow2 _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" $QEMU -nographic -qmp-pretty stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_imgfmt | _filter_qemu \ | _filter_qmp | _filter_qemu_io \ diff --git a/tests/qemu-iotests/204 b/tests/qemu-iotests/204 index 57f3afe1d73..30f0653ce97 100755 --- a/tests/qemu-iotests/204 +++ b/tests/qemu-iotests/204 @@ -93,7 +93,7 @@ $QEMU_IO -c "open -o $options,$limits blkdebug::$TEST_IMG" \ echo echo "== verify image content ==" -function verify_io() +verify_io() { echo read -P 22 0 1000 echo read -P 33 1000 128k diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 index 58a3f3ff408..72419e03388 100755 --- a/tests/qemu-iotests/223 +++ b/tests/qemu-iotests/223 @@ -42,14 +42,14 @@ _supported_os Linux # Persistent dirty bitmaps require compat=1.1 _unsupported_imgopts 'compat=0.10' -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" $QEMU -nographic -qmp stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ | _filter_qemu | _filter_imgfmt \ diff --git a/tests/qemu-iotests/227 b/tests/qemu-iotests/227 index 43f2323ff2c..be1b636af06 100755 --- a/tests/qemu-iotests/227 +++ b/tests/qemu-iotests/227 @@ -40,14 +40,14 @@ _supported_fmt generic _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" $QEMU -nographic -qmp-pretty stdio -serial none "$@" echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ | _filter_qemu | _filter_imgfmt \ diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232 index b125e54093d..0708b8b155e 100755 --- a/tests/qemu-iotests/232 +++ b/tests/qemu-iotests/232 @@ -41,7 +41,7 @@ _supported_fmt generic _supported_proto file _supported_os Linux -function do_run_qemu() +do_run_qemu() { echo Testing: "$@" ( @@ -55,13 +55,13 @@ function do_run_qemu() echo } -function run_qemu() +run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_hmp | _filter_generated_node_ids | _filter_imgfmt } -function run_qemu_info_block() +run_qemu_info_block() { echo "info block -n" | run_qemu "$@" | grep -e "(file" -e "QEMU_PROG" }