From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJlyQ-0004zk-K9 for qemu-devel@nongnu.org; Fri, 06 Feb 2015 11:41:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJlyP-0000uG-Ih for qemu-devel@nongnu.org; Fri, 06 Feb 2015 11:41:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJlyP-0000uA-92 for qemu-devel@nongnu.org; Fri, 06 Feb 2015 11:41:41 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t16Gfe0J003720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 6 Feb 2015 11:41:40 -0500 From: Kevin Wolf Date: Fri, 6 Feb 2015 17:40:44 +0100 Message-Id: <1423240849-15499-38-git-send-email-kwolf@redhat.com> In-Reply-To: <1423240849-15499-1-git-send-email-kwolf@redhat.com> References: <1423240849-15499-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 37/42] iotests: Fix 104 for NBD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Max Reitz _make_test_img sets up an NBD server, _cleanup_test_img shuts it down; thus, _cleanup_test_img has to be called before _make_test_img is invoked another time. Furthermore, the pipe through _filter_test_img was unnecessary; _make_test_img already takes care of that. And finally, a filter is added to _filter_img_info to replace "nbd://127.0.0.1:10810" by "TEST_DIR/t.IMGFMT", since the former is the way to express the full image path (normally the latter) for NBD tests. Signed-off-by: Max Reitz Reviewed-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- tests/qemu-iotests/104 | 9 +++------ tests/qemu-iotests/common.filter | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/104 b/tests/qemu-iotests/104 index b471aa5..f32752b 100755 --- a/tests/qemu-iotests/104 +++ b/tests/qemu-iotests/104 @@ -28,11 +28,7 @@ here=`pwd` tmp=/tmp/$$ status=1 # failure is the default! -_cleanup() -{ - _cleanup_test_img -} -trap "_cleanup; exit \$status" 0 1 2 3 15 +trap "exit \$status" 0 1 2 3 15 # get standard environment, filters and checks . ./common.rc @@ -47,8 +43,9 @@ echo image_sizes="1024 1234" for s in $image_sizes; do - _make_test_img $s | _filter_img_create + _make_test_img $s _img_info | _filter_img_info + _cleanup_test_img done # success, all done diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index b73c70b..06e1bb0 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -200,6 +200,7 @@ _filter_img_info() sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \ -e "s#$TEST_DIR#TEST_DIR#g" \ -e "s#$IMGFMT#IMGFMT#g" \ + -e 's#nbd://127.0.0.1:10810$#TEST_DIR/t.IMGFMT#g' \ -e "/encrypted: yes/d" \ -e "/cluster_size: [0-9]\\+/d" \ -e "/table_size: [0-9]\\+/d" \ -- 1.8.3.1