From patchwork Fri Jun 27 19:53:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Canet?= X-Patchwork-Id: 365158 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2B5331400B9 for ; Sat, 28 Jun 2014 05:54:22 +1000 (EST) Received: from localhost ([::1]:52293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0cE0-0003LW-EL for incoming@patchwork.ozlabs.org; Fri, 27 Jun 2014 15:54:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0cDd-0002uK-N6 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 15:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0cDZ-0005bR-9s for qemu-devel@nongnu.org; Fri, 27 Jun 2014 15:53:57 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:46307 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0cDZ-0005bJ-34 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 15:53:53 -0400 Received: from localhost.localdomain (laure.irqsave.net [192.168.77.2]) by paradis.irqsave.net (Postfix) with ESMTP id 608B1B465A; Fri, 27 Jun 2014 21:53:51 +0200 (CEST) From: =?UTF-8?q?Beno=C3=AEt=20Canet?= To: qemu-devel@nongnu.org Date: Fri, 27 Jun 2014 21:53:43 +0200 Message-Id: <1403898823-28364-1-git-send-email-benoit.canet@irqsave.net> X-Mailer: git-send-email 2.0.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 80.12.84.125 Cc: kwolf@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , Benoit Canet Subject: [Qemu-devel] [PATCH] qemu-iotests: Disable Quorum testing in 041 when Quorum is not builtin X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+incoming=patchwork.ozlabs.org@nongnu.org This avoid breaking tests on RHEL6 where gnutls is too old for quorum to be built by default. Signed-off-by: Benoit Canet --- tests/qemu-iotests/041 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 0815e19..c5267c0 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -18,6 +18,7 @@ # along with this program. If not, see . # +import subprocess import time import os import iotests @@ -735,7 +736,19 @@ class TestRepairQuorum(ImageMirroringTestCase): image_len = 1 * 1024 * 1024 # MB IMAGES = [ quorum_img1, quorum_img2, quorum_img3 ] + def has_quorum(self): + qemu_img_args = os.environ.get('QEMU_IMG', 'qemu-img').strip().split(' ') + qemu_img_args.append("--help") + p1 = subprocess.Popen(qemu_img_args, stdout=subprocess.PIPE) + p2 = subprocess.Popen(["grep", "quorum"], stdin=p1.stdout, + stdout=subprocess.PIPE) + p1.stdout.close() + return len(p2.communicate()[0]) + def setUp(self): + if not self.has_quorum(): + self.skipTest('Quorum not builtin') + self.vm = iotests.VM() # Add each individual quorum images