From patchwork Tue Apr 10 19:39:02 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: 133103 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1638553ljb; Tue, 10 Apr 2018 12:49:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+DghaJUIWmIgzjb2T8MfugE08kT0itz/6mjqgB/gyTDvzGVbjodgx4BX8UpfIlgJFcHHBZ X-Received: by 10.237.53.97 with SMTP id b30mr2983457qte.230.1523389746646; Tue, 10 Apr 2018 12:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523389746; cv=none; d=google.com; s=arc-20160816; b=lW09of+KMTnP/fit1qLvYC3zaUIEa9U+Vq7w7UdQZsFIsAcqKU7OO9QIrgiltMgoM1 lKX2kYp0WEGr+4DxC9EfwFTNcTF/l46b2rPslog/V0vvJ/mdp6QgVBErfybdPrLJedjz mDrt/Px6zexgJrmgC9AOrbd3exMQmhsqzb5dHRO6Ht8aWMhWymf+bHX5+O/qkIi9f+ZX lkFrOt5K9GKEMzy9SFpEVO4mJFizKI9xjfAzCBrLujigrzdmtatrsLLbqaQpj3rM8RS/ MhKnrK0P0qXR4SpzlntDwHh5fdirtqN2NaH1CkOQobb5chDe5xi+Nit9vRHnA/wWRocm 6bWg== 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=Iw14EL8gDRYNwQzOxg4iHZWWM4zbBhJGAZoJ6ohcpmA=; b=lDiNYw2n3APOOIH1PpNtcq4ACKN9gcGKNrvnLdJcC+YP5t/aT1yGIw8N5p8rinn03w dSxGL8ndLX0ShbfRkvxbsvKITJAJEmGkFqOfgR3HkrSjhHNarDgQ9/4hqYUtjpSbKDkh J5e3jXUC0bmlrOP2wqpY77wiJefZuRAN2Z1E88DH3fmf3+pWWnv+3er8o5HW5OYQgu28 +ywV2gNVWY9RHp/SSx0d2ieWsoGqEu4cZIq7S+HGO/kqsqBRIaVUTJCJxIpxYXJIw0XK HXIQQD1BUj/YdPL1SVTP/2DJhkKYTMjLYSf8ta0CVHoyUhpxGGFn6y448UgaHwgcv+NN s0Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UGkxSl45; 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 p52si3154121qtb.70.2018.04.10.12.49.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 10 Apr 2018 12:49: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=UGkxSl45; 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]:39822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zGM-0007LP-1F for patch@linaro.org; Tue, 10 Apr 2018 15:49:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z73-00009g-An for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z72-0006K9-Cr for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:29 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:36344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z72-0006JY-5Y for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:28 -0400 Received: by mail-wr0-x243.google.com with SMTP id y55so13941448wry.3 for ; Tue, 10 Apr 2018 12:39:28 -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=Iw14EL8gDRYNwQzOxg4iHZWWM4zbBhJGAZoJ6ohcpmA=; b=UGkxSl452DI+qQaH7RacXkm4cqA1i0f03x2/CxTevj6u4igE3npW6QTP+oS+d82BIv vYfAFb/7x5oTykBzIuOGStVUp5QbwnWXFsJiIgdU8adj9oBF66ezoLseCqIUS9PPLNrV U88PqXEakBigNud7x9MgEfRmuksjHgnDUAWos= 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=Iw14EL8gDRYNwQzOxg4iHZWWM4zbBhJGAZoJ6ohcpmA=; b=IcEMl5bDFii1klNWSGhazezxcEevDOghBkKgJKmDc02FwDYsp9W7WBoRGMkZO9dBid rVrtlKxfq1Wx7a9p2d3EXjUL2auUeNsCiY33NHd2osDbtLsRAPOu3lWwEN8dCsdMa1sI nbsdcwELsGY6DhwtrLUfbF+NYb+LMA0Bw6lLoT6D2a0Bq/blkbIdbNJGPApCVnEXu4If DgIFv5he7dZXCdAm+boeBpVEBiohDf2JOwf8sg6mk5tT8Y+nWyR0ZTuwHsBWhHv6w3Nh vjmG830QBTfL73LcavmYqGh6t+ZOLe8BzNnG7oA4rvm+KT0FHOShbFzeGhNo2Ush2vQ6 RqPA== X-Gm-Message-State: ALQs6tBJgpLN9ZSveoik0iA3ZLWyfftVf6SnzVaDtKBNOsKU+DfpMqap phaZFB6BCOeQf2yB4NYFVIVk9w== X-Received: by 10.223.224.141 with SMTP id c13mr1370645wri.88.1523389167089; Tue, 10 Apr 2018 12:39:27 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n49sm5619919wrn.50.2018.04.10.12.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E33233E0980; Tue, 10 Apr 2018 20:39:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:02 +0100 Message-Id: <20180410193919.28026-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-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::243 Subject: [Qemu-devel] [PATCH v1 07/24] docker: allow "cc" command to run in user context 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?= , famz@redhat.com, cota@braap.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- tests/docker/docker.py | 5 +++++ 1 file changed, 5 insertions(+) -- 2.16.2 Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9444f4bea4..f79213044d 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -399,6 +399,8 @@ class CcCommand(SubCommand): help="The docker image in which to run cc") parser.add_argument("--cc", help="The compiler executable to call") + parser.add_argument("--user", + help="The user-id to run under") parser.add_argument("--source-path", "-s", nargs="*", dest="paths", help="""Extra paths to (ro) mount into container for reading sources""") @@ -414,6 +416,9 @@ class CcCommand(SubCommand): for p in args.paths: cmd += ["-v", "%s:%s:ro,z" % (p, p)] + if args.user: + cmd += ["-u", args.user] + cmd += [args.image] # The compile command we are running