From patchwork Mon Jun 18 13:07:06 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: 138931 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3935501lji; Mon, 18 Jun 2018 06:10:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKxZmRkFWthC2IYpUZlum2tiBeXibR8OcfSEtYisAfUNzYZDrUd6QT15QQ0dsjyqeUPQdfE X-Received: by 2002:a37:9dd4:: with SMTP id g203-v6mr10098503qke.197.1529327406822; Mon, 18 Jun 2018 06:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529327406; cv=none; d=google.com; s=arc-20160816; b=GheQM7nJZnIWoa5N3XJPsT1wXKUHJQnPk+AoZ++etcaSWP7ey+CeKLbRRuSI/nt2aL IwtTsfusAgMpneFdZdFW+ptDXMraOmw0yJBvdj5z5Z6Tu1oiPfyKj6SyQsgXLV2p2LUN RgSbn0gvXQfzfOOUAAS2qfOctc5tmskxy7984AmpkrFeXP14NRY1N+FXyVlTbYSZ1kq9 ZwxqVbUcDoLrjshx+QkhpvA+26ELHnLd/tnlPs9jJQYIdGTMGJnpFMaIfVv2VmxmpKAM Olq8YC6UefglVoAKxtmxyuxN0uPStYz3D8qFz1QHG+rpSNzjW4TRqvepRKCqEF4sklFv GJ0A== 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=ecz+Ilq7CZkxnIqJjCPOjfRhEywCxFiSW4xntMf1J8Q=; b=w2fQi2cLd2O8jwvMTrBXvmA2VMrS+pHPvmwRE/TSJGpXqPGqle6aaNaZWULaSlqGOf MRIz46r9A3zgyNs1g0bIh+nHEOulIf6EPp9f2aPKEus9+01wz7IeIfsfg56tm3ZG2Bb5 wOeQGDxubSQWjyHu5dj9E6pIp7vuRhHZ/n0p/dvl9c6spkOVI0MersNGNDV2/Ns2gXN3 9K3cMUEhp/FtsXUC58onI0/KayvDOaKMY7qV+Qwnu3GMQ+Qvr22cXP3HaZqCWJ6dU8bB pmxNbMSL6T84fe5tAoUjvFUuJtLXtAWjmZcSM2/g+SiK4zC30LdZZjDjURGijtcFfzHh l3LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iwK0cRf6; 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 135-v6si5280316qkj.115.2018.06.18.06.10.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 18 Jun 2018 06:10:06 -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=iwK0cRf6; 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]:34721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUtv4-0008KQ-69 for patch@linaro.org; Mon, 18 Jun 2018 09:10:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUtsM-0005yF-Ns for qemu-devel@nongnu.org; Mon, 18 Jun 2018 09:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUtsL-0002fM-G1 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 09:07:18 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:51656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUtsL-0002er-8D for qemu-devel@nongnu.org; Mon, 18 Jun 2018 09:07:17 -0400 Received: by mail-wm0-x244.google.com with SMTP id r15-v6so13954626wmc.1 for ; Mon, 18 Jun 2018 06:07:17 -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=ecz+Ilq7CZkxnIqJjCPOjfRhEywCxFiSW4xntMf1J8Q=; b=iwK0cRf6gnW/q3PDSIfYHuaNOBaP3WGyYwQj25AISzv3uTfOEeMnkkxLltnRm5ByOP bmiW+8/f4ACi2uLKRG8TwzwgXtG9A6TvI9Kz+H//k/tSWKNwJMSZ5j+5RoPyclaajVRx I/ddG3gMMuMxu3VZQn1dob6pgb4TsixPOm6dU= 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=ecz+Ilq7CZkxnIqJjCPOjfRhEywCxFiSW4xntMf1J8Q=; b=mZsv4UCAWCEihLOvQAECaJOrrC2TSOs9N4UawV3y3rrnSS/4NDPcuyirNGR9LQW2Yd 5UzN9GBfKtvx+/6/XTJoK9/seAb1S+8Idjtbr+6DuEvJwzm5UqMa65qudop5nOXMskbn 4LQN13UdNaG1pezXSKI564NIBNDsNTkuPNYK4lzhvHH9hbWo5fwIEPaGgJJIRXUBYAbU ZDwJAAgBSjPCYfsQt7ytlQMlwRHUsGuZM2E66E058QGDR7zLhkUcDG5O/fyFVYIof8KP AZJI76HZB3sv2RYKsrH67YRKoouMjqyP1LwC2eGtpdrEaKnMjDfIF/jFSLJ6QPYbr4NF VJxg== X-Gm-Message-State: APt69E1mi7tPie0d1Mu4pw7F8zDuGr699WJsjYKxwyV1HXWfoGTJG2yw MD1Sr025dg7Qvw5Ni7Pl2Dvkvg== X-Received: by 2002:a1c:8312:: with SMTP id f18-v6mr9029299wmd.127.1529327236178; Mon, 18 Jun 2018 06:07:16 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id z5-v6sm12504775wrh.10.2018.06.18.06.07.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 06:07:14 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A76593E063B; Mon, 18 Jun 2018 14:07:09 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: famz@redhat.com, cota@braap.org, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Mon, 18 Jun 2018 14:07:06 +0100 Message-Id: <20180618130709.19730-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618130709.19730-1-alex.bennee@linaro.org> References: <20180618130709.19730-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:c09::244 Subject: [Qemu-devel] [PATCH v1 5/8] docker: docker.py use "ps" 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org 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 --- tests/docker/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/docker/docker.py b/tests/docker/docker.py index c83fd89985..3072bf4a31 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -49,7 +49,7 @@ def _guess_docker_command(): commands = [["docker"], ["sudo", "-n", "docker"]] for cmd in commands: try: - if subprocess.call(cmd + ["images"], + if subprocess.call(cmd + ["ps"], stdout=DEVNULL, stderr=DEVNULL) == 0: return cmd except OSError: