From patchwork Thu Jun 21 06:25:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 139472 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1687738lji; Wed, 20 Jun 2018 23:47:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKItUsn/mOPU6WfqWEM2N7avBBffREdRQA5QO0Rs8oAilwm59IXo5O14sjQULV/uVf9g4+H1 X-Received: by 2002:a0c:e791:: with SMTP id x17-v6mr20704622qvn.114.1529563661861; Wed, 20 Jun 2018 23:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529563661; cv=none; d=google.com; s=arc-20160816; b=FZQRcQ1LyDxCTCnFMzTdCoeaVD32qJM5VqXMeEjaDRosLdlMDQqHeaMvWSMtkeDBaj HA39s9UxYMJOnCGW29qSvvZThMu3oPM6J9K1N0FoXY1pAu/f+XChiK35xERO880WIxbO J2pxG+uIH50wjjBmOp4wCo+5mqGZ9dHrm0FeN+mBIoFGHlUu+w09kPFQOYay+DDuJUaZ buMcy4WlySwQ8MBnLX6whaPsn0iAVbmKEzmIPuNEL9CFGqT+YpjuhcrSTO0P3owq0Fyk fa7E2AYjJG92Ub4eBCzO1lsVR8iXE5P+ftKUbSgbmhB9Ys71JGljzBiCtVk3+iCDYeFE jwBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Zz0a/EjjRDgcgE0v1Yva2KL8EenOhHXDz/OCw+JetY8=; b=sZhqhoUvC+TPWVGangkjLbh/qJSuoGINtQiJEUG6R9hlegtpopkCwzb7z5vJm2IHRt qgRMPieYS+SuqZYOi9c22OjawI1BxGEo97Z3yLiMJK/QWFuR0Tv+VZeFkp2n/mh4s+Z8 MKlufFKxNoI9w7RdfkaPAZ0qax9zswhVFfS9U9wkNlEF0CEiUMQSSKNWYCsiBfdaSxGQ 1qWPQ07H+o7DuFko2mCIkGQaoUi6aEHAv656Auhf+UUdVgy5ixrKNnK97eb9lXARBxHq 1Chv+ipSioIkjPNBPpw+O6+H2l64G7YyVZKe2SUSO3qY4e768aaVyaBKWhKv95IIv+46 /czQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="j/5pCRbV"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t127-v6si3993864qkc.292.2018.06.20.23.47.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Jun 2018 23:47:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="j/5pCRbV"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVtNd-0000qM-Ba for patch@linaro.org; Thu, 21 Jun 2018 02:47:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVt8R-0005hQ-U6 for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:32:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVt8R-0003lo-2R for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:31:59 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:34393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVt8Q-0003l3-Rd for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:31:58 -0400 Received: by mail-wr0-x242.google.com with SMTP id a12-v6so1855564wro.1 for ; Wed, 20 Jun 2018 23:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zz0a/EjjRDgcgE0v1Yva2KL8EenOhHXDz/OCw+JetY8=; b=j/5pCRbVsyHnftiu8WPujuGLJci3HdxMWCbjD2jc68ydPfL9ZlE1o35PLQsirtSq/n MVLMOkzEyYjflsVZiwz22nr+J4iGGwLEc21MuKCBXNcqBhXihgg+TGxwViy++O06dI+Q EXeR5PT2sv1gCKfWc/bBuV+ou7f/Gigp6sjIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zz0a/EjjRDgcgE0v1Yva2KL8EenOhHXDz/OCw+JetY8=; b=o6zyAaVfjQhPwAtAdq7dVOY4vdAWFPi/X76d5jqUQTrQIi1izFxZtkX6h1yhqqTBil +D0KyUe8C7sd5YVigORUusiOuJ8sTaKziY53N6cLc8Wcs8oT/u41eSggA2BeN0J7wogh ikhwRLdvF8ZWlF/uwkXMsgJtFFNtMZTE7IyeuSq+705lnc3pq2vpPz1XnBvDMqBrx2M8 PpBcSOw66dlZgx5QD9xu5Gu1PhHGnbseEiTXc2OOD6nURg/s6OG2Za+eb8Z44/QiwwPk p8CuFQvb5sJh8r6tPaWAJxVH4fQxynMBaPmwWprBt/nplNzO1BvnF4wmQr2bnG/v1Rdo nkPg== X-Gm-Message-State: APt69E2YV1iYDwmH2NyEl74KEpgy4zLTWlT7p91l+KfG6UK0zq9+9Z6Z lCJT3ZUB0d/qQMYz25pH4umJrA== X-Received: by 2002:adf:db91:: with SMTP id u17-v6mr34502wri.217.1529562717817; Wed, 20 Jun 2018 23:31:57 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s191-v6sm8403620wmd.27.2018.06.20.23.31.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 23:31:55 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A9FD03E0158; Thu, 21 Jun 2018 07:26:09 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 21 Jun 2018 07:25:59 +0100 Message-Id: <20180621062605.941-52-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180621062605.941-1-alex.bennee@linaro.org> References: <20180621062605.941-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PULL v2 51/57] docker: docker.py use "version" to probe usage 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: agraf@suse.de, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The "images" command is a fairly heavyweight command to run as it involves searching the whole docker file-system inventory. On a machine with a lot of images this makes start-up fairly expensive. Signed-off-by: Alex Bennée -- 2.17.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index b28ad87034..e6437d64a7 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -52,7 +52,9 @@ def _guess_docker_command(): commands = [["docker"], ["sudo", "-n", "docker"]] for cmd in commands: try: - if subprocess.call(cmd + ["images"], + # docker version will return the client details in stdout + # but still report a status of 1 if it can't contact the daemon + if subprocess.call(cmd + ["version"], stdout=DEVNULL, stderr=DEVNULL) == 0: return cmd except OSError: