From patchwork Tue Jan 19 17:52:02 2021 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: 12030313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED8E5C433DB for ; Tue, 19 Jan 2021 18:35:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 98F5E22D2A for ; Tue, 19 Jan 2021 18:35:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98F5E22D2A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1viX-00044s-19 for qemu-devel@archiver.kernel.org; Tue, 19 Jan 2021 13:27:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vAw-00010I-Le for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:19 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:44521) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1vAr-0003md-DY for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:18 -0500 Received: by mail-wr1-x42d.google.com with SMTP id w5so20583092wrm.11 for ; Tue, 19 Jan 2021 09:52:11 -0800 (PST) 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=Z1pwI3vYS5zF+thwL7KFBLXWBDqCuQgrG7iqQ6JY8Jc=; b=fvUyUXdWTL6Sfy0frqKvjv8x3iXRZ1sJQ+Q4umsxsbdaML8RXBYwGrpsFkpb60pxnC 0+r74lqCa6nInAV+6ceAHfxcIpjN/jF+50NJ2olwuktn3biVLA6aJKB0ksgTrOhx9h0H wRjjK1OIzCG9iDSCXwmiWDbFNTWeBYDu+eyo7aXP0Y33morZBTpZTEagSkT5gz3O8P42 6HqeIvtXN8obsNEu1dXADZpkenHuDn1SgaVziqGPESdZj1X6iLbFonu5/kfFoYHHTdj6 Wwgv2Ou3SrjzTHcVigpK5nxapawpIS5nnAlMGQLN9IZHkvlAwv5Y7N3Dka1rlQe8iLXZ 43Rg== 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=Z1pwI3vYS5zF+thwL7KFBLXWBDqCuQgrG7iqQ6JY8Jc=; b=NghsJJtooxPUv8fzXy2LqQ8O1Pylhel4lCQpVnVIGBVJ6WE8WKoYPcqYEyvqkRdGNW rOwb9LQkRYSysLV5adfRlKoUYpI9qD8oIS7UKvdyarMEi0W8tbfZcB9Ip1HxRZHu7LAS i/Nrw8tY6Sk5AWQ0jrG/LZD4XzZlr12spqubVKF67cZaf46+keMF436FRmB7tJ6LboVc Fk0iGiJB0tyi6+jVjhTmgWGFpoVZ8HSQes2m348iXx+M33UjmgPDmTH2SpulQZ2eIrYF diBXC44rijr6BwQhMmRkpRepdM5kSYI10KViY3UmKllA1SbNC0pseOev6k+DtqqQZIJ2 VUlg== X-Gm-Message-State: AOAM530J0UahrHMdzyRANqYcMHYTxyJhr63DMsvPs/FD0pHmHuZu/PLj +R2pp/Rt74aYRamEH4ce9+Lvng== X-Google-Smtp-Source: ABdhPJwYGhuBcvF5oLnpe5pfVfpvTLwwL6cp1TM87aXKHo8HpQJbil47RqC9Grc/jKMsKRmqM5fHjw== X-Received: by 2002:adf:b1db:: with SMTP id r27mr5557681wra.125.1611078730922; Tue, 19 Jan 2021 09:52:10 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n6sm5516896wmi.23.2021.01.19.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:52:08 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 21A8A1FF87; Tue, 19 Jan 2021 17:52:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 1/6] tests/docker: Fix _get_so_libs() for docker-binfmt-image Date: Tue, 19 Jan 2021 17:52:02 +0000 Message-Id: <20210119175208.763-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210119175208.763-1-alex.bennee@linaro.org> References: <20210119175208.763-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Fix a variable rename mistake from commit 5e33f7fead5: Traceback (most recent call last): File "./tests/docker/docker.py", line 710, in sys.exit(main()) File "./tests/docker/docker.py", line 706, in main return args.cmdobj.run(args, argv) File "./tests/docker/docker.py", line 489, in run _copy_binary_with_libs(args.include_executable, File "./tests/docker/docker.py", line 149, in _copy_binary_with_libs libs = _get_so_libs(src) File "./tests/docker/docker.py", line 123, in _get_so_libs libs.append(s.group(1)) NameError: name 's' is not defined Fixes: 5e33f7fead5 ("tests/docker: better handle symlinked libs") Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210119050149.516910-1-f4bug@amsat.org> --- tests/docker/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 884dfeb29c..0b4f6167b3 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -120,7 +120,7 @@ def _get_so_libs(executable): search = ldd_re.search(line) if search: try: - libs.append(s.group(1)) + libs.append(search.group(1)) except IndexError: pass except subprocess.CalledProcessError: From patchwork Tue Jan 19 17:52:03 2021 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: 12030345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2552C433E0 for ; Tue, 19 Jan 2021 18:51:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BD4222E00 for ; Tue, 19 Jan 2021 18:51:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BD4222E00 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1vTE-0005s6-V3 for qemu-devel@archiver.kernel.org; Tue, 19 Jan 2021 13:11:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vB0-000124-4y for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:26 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:55856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1vAs-0003mm-Mc for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:21 -0500 Received: by mail-wm1-x334.google.com with SMTP id c124so572144wma.5 for ; Tue, 19 Jan 2021 09:52:14 -0800 (PST) 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=sE2rw1O4u9cYqn0FvywReTtt3n/OCFCQyRnzm4hokb8=; b=Vxf/T+guXKKFi79QLvzeis3tcD1TTzYG3CknaiX/DIKiMGVOTtXYtRtE5C9Iwu5q9+ zYVbHlpOjoOOqdr9h2CK5H1GW/eb6i6VJW+81MYCP1fEkDkZSRC/FCAh7NBcyfo2UVRA 72hD4mmTOdEpYJ/TckWPGWJDDOe8GKUaSjPn+1dZVq1C+DZYnqr/iXKrF6dFrh3WLbpP /PpACeQqsjhHIdKGtWMxAr+7F/sARQOpp0xmrmLMLf/zCC2qF3ja2A4rT/DMiFCXGbKG MpcBhbwtSbWeEMdxpRQ6uds1Sd5OnqIzqXsOuFER9HuXhPxPk/NIPQ6NzLJwWjdLYYNG yl6Q== 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=sE2rw1O4u9cYqn0FvywReTtt3n/OCFCQyRnzm4hokb8=; b=s254rKRUfJcy3qgdlcRpwqB62KXs216mhoc5LV2BTm5q+OHd0AfjdiHMYzwUlGGKxO SqMFqtapQ43G5fEOxkIkLKO1bBmfJCN9SnGhx1E7pOhnTxqS9mSPT3kzwzl4SlyXogqO DgQzrW0ED7kjRVMqh0kjLGTFPCzIkJeHxK4lpshf2k6pqayWrZpkqZ+y2jqVM1/9ZwAF tuuOzYFoxYn+AQqYG82In3EXBlhegRcr0t/bBS6PkbaTtpF0RPDkshXou4fU4lEnduic k0jjBIHJvWLAk8NoSQP+hcot4yD1GYMXcm7B2XhujgDzwo+4dTGScHOasxFGqrUlP6ej zETQ== X-Gm-Message-State: AOAM530UopXt6QEtO6ooMejw0513gpTr4xiaWyqJXGkWPIN536kBNQ6U Ov+QbBhv83YGoP37JKxtq3IM9Q== X-Google-Smtp-Source: ABdhPJzjv8+6G6mXo49wN/wp/kVz9bjVzlFSnWkHlXv/ZXh56+y6XhxJwBZyq3LElJDy1VW+t/sZXA== X-Received: by 2002:a1c:9844:: with SMTP id a65mr705534wme.113.1611078732917; Tue, 19 Jan 2021 09:52:12 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n11sm41984176wra.9.2021.01.19.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:52:08 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 377AD1FF8C; Tue, 19 Jan 2021 17:52:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/6] tests/docker: Fix typo in help message Date: Tue, 19 Jan 2021 17:52:03 +0000 Message-Id: <20210119175208.763-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210119175208.763-1-alex.bennee@linaro.org> References: <20210119175208.763-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé To have the variable properly passed, we need to set it, ie. NOUSER=1. Fix the message displayed by 'make docker'. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210119052120.522069-1-f4bug@amsat.org> --- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 0779dab5b9..bdc53ddfcf 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -209,7 +209,7 @@ endif @echo ' before running the command.' @echo ' NETWORK=1 Enable virtual network interface with default backend.' @echo ' NETWORK=$$BACKEND Enable virtual network interface with $$BACKEND.' - @echo ' NOUSER Define to disable adding current user to containers passwd.' + @echo ' NOUSER=1 Define to disable adding current user to containers passwd.' @echo ' NOCACHE=1 Ignore cache when build images.' @echo ' EXECUTABLE= Include executable in image.' @echo ' EXTRA_FILES=" [... ]"' From patchwork Tue Jan 19 17:52:04 2021 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: 12030551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 007C9C433DB for ; Tue, 19 Jan 2021 19:24:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8CDB6216FD for ; Tue, 19 Jan 2021 19:24:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CDB6216FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1vOr-0001hz-5A for qemu-devel@archiver.kernel.org; Tue, 19 Jan 2021 13:06:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vAy-000110-8X for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:20 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:35670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1vAv-0003n3-3W for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:20 -0500 Received: by mail-wr1-x435.google.com with SMTP id l12so15377442wry.2 for ; Tue, 19 Jan 2021 09:52:15 -0800 (PST) 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=OEMrYXFLFBgx9QE3SeqCE2AX1IhddCjd817s2XOV/Yo=; b=HBGuYYKTTua8Nc2kXc4HLJolOtGXoVdhiDz6pZDso7IO+SrjohPmgufNQruOKk8Hk3 GvQBHPiwy8uADWIlim8IG1sDY4t7QwemD9F86l2xSI0UCC9QAn0edIJg/SlDJ097N78W n0wfviQmstv0QUP76bJXWhNpr9QhqAhVXnNU1X5zNlhNmJSYHt/ADXz2MGdMGK7TrWa/ OMS9s2czVAdP6qJ1qZtNe9Iww0d2RIHlumaDGwlX+dftqRywDKgFykt3wtwpYGSe9CNH iw2j6Ix86lbu1mIlPDeTkjHT7zSWLSHdozR2sg2tpDffa/nWGuM7IWbtwuZINlC1e0FV dj/g== 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=OEMrYXFLFBgx9QE3SeqCE2AX1IhddCjd817s2XOV/Yo=; b=AQ7zttMiuUYTkYJ4Fcm30jahLxInKNXAH13wyj4wtwuenbVsn5E/zKb3roZ4VoxsTM MJSplarWH9G++nl7zUI2IzU1vX9Eo2vQdrwb9pHdDqFyOe7dEM4Ot3jkE30YrgQuN67P z/lvn1F+yrlqdIIoipXkVMdnJ+FBs9YJvwwQUPdVKX8jpLewQ1MSx+lHDhNvcYOM7J2A cQ3ysEjrO25DwWXEg8Z1cxNVXNDEB97jruBNHUbdQrDb3C3nA2nPVUmApGjHZreh/r0z wTDDfNYMrCCe00g8vUSfxBJ6elsiTSRncd0dHSjGThhAUF95U7w94mNYT4MwuXal8JmY MShg== X-Gm-Message-State: AOAM5313cpfx4zwq1dRNky8gzf117n1SmHMHqGlTKhOXiqV9FZc0qwPp eE/cT/nJtdoSV2j2miCmQiFarQ== X-Google-Smtp-Source: ABdhPJx8gUgF9d3MV+uc/UEM9oLlo1hcRYvf15yu7nsdfgaODdTYEln3bx/pnbdr59Rcwr3bIlfXFA== X-Received: by 2002:a5d:4d8d:: with SMTP id b13mr5290144wru.415.1611078734557; Tue, 19 Jan 2021 09:52:14 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 33sm40802668wrn.35.2021.01.19.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:52:12 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4DC9A1FF8F; Tue, 19 Jan 2021 17:52:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/6] tests/docker: make _copy_with_mkdir accept missing files Date: Tue, 19 Jan 2021 17:52:04 +0000 Message-Id: <20210119175208.763-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210119175208.763-1-alex.bennee@linaro.org> References: <20210119175208.763-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Depending on the linker/ldd setup we might get a file with no path. Typically this is the psuedo library linux-vdso.so which doesn't actually exist on the disk. Rather than try and catch these distro specific edge cases just shout about it and try and continue. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 0b4f6167b3..fb3de41c0b 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -103,7 +103,12 @@ def _copy_with_mkdir(src, root_dir, sub_path='.'): pass dest_file = "%s/%s" % (dest_dir, os.path.basename(src)) - copy(src, dest_file) + + try: + copy(src, dest_file) + except FileNotFoundError: + print("Couldn't copy %s to %s" % (src, dest_file)) + pass def _get_so_libs(executable): From patchwork Tue Jan 19 17:52:05 2021 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: 12030321 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91985C433DB for ; Tue, 19 Jan 2021 18:40:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CC0120776 for ; Tue, 19 Jan 2021 18:40:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CC0120776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1vTl-0006BY-Q8 for qemu-devel@archiver.kernel.org; Tue, 19 Jan 2021 13:11:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vB4-00012M-S5 for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:27 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:52827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1vAv-0003nI-3W for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:26 -0500 Received: by mail-wm1-x32a.google.com with SMTP id m187so591562wme.2 for ; Tue, 19 Jan 2021 09:52:16 -0800 (PST) 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=l9hs2c1uUiGj7MHevQ781qlr6u6iQ0XBGuGPt72flqQ=; b=iB0kqQYAowRt+V2KPtEaKcSP2sDe4IlJfkIO+iE0nTIvD5csYOSiE5hoSec7OLx9mX ZB/Z4m1aWJHqfISGPG+53GA9142wLc+H8nvCQ9B1mSAJUVjqEbtr2GIIYdBBIn2/QgYe GHGyETilsvWpbkHihuG4iYyHakF2KBYjXp3NPld8+tXknvtUoTNwSUGXacekQY0q+jsd DmfAvacIuyrxWIrynQzSRcQn23UjZtmwl0Hzv8FP5aDsFLt8HdodwnXKhPTSxsOvFMYT vhtSjQN/4fX9/Y/3RdYoI0vvrzVKVYbtHQrf3914TTwMhc+TsnmYyzqA717dW3pD3ncT 1fqQ== 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=l9hs2c1uUiGj7MHevQ781qlr6u6iQ0XBGuGPt72flqQ=; b=iT/yJQ3+RLemRBr30VhRWtTc3rrlnHZZrq3sEX49n3GTH1LjM1rSS8F5Wm3P1aYvJC RhhIeVVBw02I6Bn3bA7qmJ8zUERNRuXrZANtaGuaavFrdEPDVoyVOo2B3lIpj4TFv8Fz 1wT5M1fzQ/UhqJKyYnXqVnVVXHTPhEKSZCjLubp+A2CgutfBqGK6OBvATT1JrkKqFA9S ffj7Gi0KsYk1DdYkH1iAHIFDiN599rWcRYEJ3N2zVx0p+ZC8TIQiBOKoUwqVP+Wm4rkr NYHn3QNkSMrH6gMhBTOno3+m1j6rZhVuMiuhUdoqCPfpkxZsdwR9UTPQ8hdRguj/R8yL ZENQ== X-Gm-Message-State: AOAM5329rhanKacJUICg/f5nEsH3PVwgGg1QeGbL39bm8fNkchf4oT6M JURrqUolnN66GStJx/QVWLk2g3ooA2nd+aLM X-Google-Smtp-Source: ABdhPJyrY1Vh1ZnvkM4Ctxsn1/365A9wMsHwauJvl+C0468PPZO237aHWqucjiVXruAh3A/O8lo/9Q== X-Received: by 2002:a7b:c196:: with SMTP id y22mr713914wmi.91.1611078735692; Tue, 19 Jan 2021 09:52:15 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l18sm5381254wme.37.2021.01.19.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:52:12 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 642051FF90; Tue, 19 Jan 2021 17:52:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 4/6] tests/docker: preserve original name when copying libs Date: Tue, 19 Jan 2021 17:52:05 +0000 Message-Id: <20210119175208.763-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210119175208.763-1-alex.bennee@linaro.org> References: <20210119175208.763-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" While it is important we chase down the symlinks to copy the correct data we can confuse the kernel by renaming the interpreter to what is in the binary. Extend _copy_with_mkdir to preserve the original name of the file when asked. Fixes: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Bennée --- tests/docker/docker.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index fb3de41c0b..39da3fefcf 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -93,7 +93,7 @@ def _guess_engine_command(): commands_txt) -def _copy_with_mkdir(src, root_dir, sub_path='.'): +def _copy_with_mkdir(src, root_dir, sub_path='.', name=None): """Copy src into root_dir, creating sub_path as needed.""" dest_dir = os.path.normpath("%s/%s" % (root_dir, sub_path)) try: @@ -102,7 +102,7 @@ def _copy_with_mkdir(src, root_dir, sub_path='.'): # we can safely ignore already created directories pass - dest_file = "%s/%s" % (dest_dir, os.path.basename(src)) + dest_file = "%s/%s" % (dest_dir, name if name else os.path.basename(src)) try: copy(src, dest_file) @@ -155,8 +155,9 @@ def _copy_binary_with_libs(src, bin_dest, dest_dir): if libs: for l in libs: so_path = os.path.dirname(l) + name = os.path.basename(l) real_l = os.path.realpath(l) - _copy_with_mkdir(real_l, dest_dir, so_path) + _copy_with_mkdir(real_l, dest_dir, so_path, name) def _check_binfmt_misc(executable): From patchwork Tue Jan 19 17:52:06 2021 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: 12030553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0305FC433E0 for ; Tue, 19 Jan 2021 19:26:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C76223104 for ; Tue, 19 Jan 2021 19:26:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C76223104 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1vXA-0001s5-7C for qemu-devel@archiver.kernel.org; Tue, 19 Jan 2021 13:15:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vB5-00012l-U7 for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:27 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:41681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1vAx-0003na-WB for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:27 -0500 Received: by mail-wr1-x436.google.com with SMTP id a12so20578966wrv.8 for ; Tue, 19 Jan 2021 09:52:18 -0800 (PST) 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=Nr3F1s/uxAkZsOjDBgzUMQ0nBu9JtUUnCgKnB3ia0u0=; b=x+DoS/jdeXRtAlobj8i5px96YIkRQBfuBk13yhtED9JFQ/5RRGyX0lbtAuwNMSdJjI UNjDoSR9+8ts+iLgH2GRScb2b5PhnU9V98q1E1TB7wazwgultCYQcNal+6vwvNwwlIcu kelDG8cXmbcMNrZhfi1/DN+BdTfjvwafU2kAm7gd2n/cGx5AVBVK6oKUXhMJsomZ5Qmj 9ohpWmYN0CrYXb6wpnCIJ53d4rx9oTciSSlSkP/VE2XqloWcT1v67szmgKYmLZpxo5kD f0FS8MpLq/UWqQAx2cwiDJCqVFByyFxAQCxisGcP+/aWPwlBIxaGDlU2/o+pjAKFBBSr yd8w== 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=Nr3F1s/uxAkZsOjDBgzUMQ0nBu9JtUUnCgKnB3ia0u0=; b=gFgMB3Tp05MBE4ISVOpZQNerTa7H5QwqYyb3TdrW8MXN/aB18uzi8bFFIPKv3tR6CY HJxs2RHWopjNeOgaTu2bkwZ1DEkgGEkwNcIiGAStLHIUfu1SAN7mIT/dE+kCi5nOr3Hs ycOzpa2ZIS+jwpK0Wv58b5Z5vas1T60FiPxYJux32WlXINeHCCPCS+FnYqSqBzCkydny nG3vb++8miA7mjVLioggogOHxoM/rXEV9VuxeNd3K8kuMvi+Z0AEkoIzOeh1fGXOrITd ZdFn1J3oXwmrPVmmvKmvgFyrB+40h0/JkAskgLK8TAy3DPLiScANlbrg5+dT3DTk85B3 LiNQ== X-Gm-Message-State: AOAM533cfFOa0rXujYsbJOZVMlUWnB9h09kBjFmt4R736zW47y2K4oed Bpg+ERzoGxP5z6PAcWSRrmMRmg== X-Google-Smtp-Source: ABdhPJwiuPdvIKBWhIDDygBusOxkKM7OqeCTJZ4y/iVuPifUmZyeXTDnKVVjjRuZpW8b1DDxsLaO0w== X-Received: by 2002:adf:814f:: with SMTP id 73mr5534594wrm.368.1611078737777; Tue, 19 Jan 2021 09:52:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n8sm37419097wrs.34.2021.01.19.09.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:52:12 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 794091FF91; Tue, 19 Jan 2021 17:52:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 5/6] tests/docker: alias docker-help target for consistency Date: Tue, 19 Jan 2021 17:52:06 +0000 Message-Id: <20210119175208.763-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210119175208.763-1-alex.bennee@linaro.org> References: <20210119175208.763-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We have a bunch of -help targets so this will save some cognitive dissonance. Keep the original for those with muscle memory. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index bdc53ddfcf..a5c1e4a615 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -1,6 +1,6 @@ # Makefile for Docker tests -.PHONY: docker docker-test docker-clean docker-image docker-qemu-src +.PHONY: docker docker-help docker-test docker-clean docker-image docker-qemu-src NULL := SPACE := $(NULL) # @@ -218,6 +218,8 @@ endif @echo ' Specify which container engine to run.' @echo ' REGISTRY=url Cache builds from registry (default:$(DOCKER_REGISTRY))' +docker-help: docker + # This rule if for directly running against an arbitrary docker target. # It is called by the expanded docker targets (e.g. make # docker-test-foo@bar) which will do additional verification. From patchwork Tue Jan 19 17:52:07 2021 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: 12030371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8E9EC433E0 for ; Tue, 19 Jan 2021 19:12:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6755420776 for ; Tue, 19 Jan 2021 19:12:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6755420776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1vWj-0001bn-64 for qemu-devel@archiver.kernel.org; Tue, 19 Jan 2021 13:14:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vB6-00013T-A7 for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:28 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:35781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1vAy-0003ny-6r for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:52:28 -0500 Received: by mail-wm1-x32e.google.com with SMTP id e15so564425wme.0 for ; Tue, 19 Jan 2021 09:52:19 -0800 (PST) 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=r/l3rZk8GOIQaj/zcskGUMbwB8AQ01WgfPICmp322OI=; b=GJuMrRZI3gcQ1txl13K7Xhqdl1v8ZJ+S0/05/dItlMMgZZ1P0ApACu//kIKvdrwIJ7 S/X98i9P7XfT2OpVBkGOyq9rrIc24asmebFgTl0fEwtNmXygcZXbmCvIDNbHs6HEnhPG Dz3qh9Y3r1p/uCQeZpEjD5xf1Zkx9E9dr20RWRaae9utLmEGvPpA68CtMA2oHa/04W/V DBZSEnjDg4Z4VJQlm0NpnJHD7XsTxh7+ja9emhulIKHmf4ifJP67GJXAD3fhewmylkFE wVnpuPqfTCO06yf5jcD/zPIic8HvyTMz6PB2vyQBiDr7J3BKipGBWsn4hjCU+p9U2z2F cglw== 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=r/l3rZk8GOIQaj/zcskGUMbwB8AQ01WgfPICmp322OI=; b=VwvIja7QwMIhyLEmguUwbsu+A5EVFgSRMb2W8I48t4I+VzZUcha7ivONnpkxGNUE0D Lt/6krtf4JYsl9z7x8i1ZnEVQpY7bA/UqvIjZFj3q2pNWSAxjqFTZgdHTq6n1m2R0DCx C2vqiYoC5lJDD1MvpXAMLP04vYiikgWlTrMuw8y4CTgP4CGj+qEJDm4zTCbrMI/CvkCJ wJU1FGeF/1R+FrKJyVIZyy0Wh5+LIk3u+1V8AB6F30LScpqIi1ioIl9KKBhGSSCOeduE 8EkSThYsMRZots/ni9prBdpFtQ/CRxsvCI642k5a84GuMrEAWGUIlJik2ZVY3Eyp0+9E NP+g== X-Gm-Message-State: AOAM533yqmL+c8uhJn09s7Se7ZhcY1l9kjDC4DrHI8bmqN0PLOT7MofZ nwcYUpCj6ymgWHV84Gru9dmUqQ== X-Google-Smtp-Source: ABdhPJzWUZdnkY4iYkoSmMU/XSMhxlJDO3LzJTBmxyklX3h1Tc/fWJW16wEEDsujUL1Q/1ZaYsVSsg== X-Received: by 2002:a1c:4986:: with SMTP id w128mr705476wma.89.1611078738837; Tue, 19 Jan 2021 09:52:18 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s1sm37513971wrv.97.2021.01.19.09.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:52:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 92A801FF92; Tue, 19 Jan 2021 17:52:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 6/6] tests/docker: add a docker-exec-copy-test Date: Tue, 19 Jan 2021 17:52:07 +0000 Message-Id: <20210119175208.763-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210119175208.763-1-alex.bennee@linaro.org> References: <20210119175208.763-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This provides test machinery for checking the QEMU copying logic works properly. It takes considerably less time to run than starting a debootstrap only for it to fail later. I considered adding a remove command to docker.py but figured that might be gold plating given the relative size of the containers compared to the ones with actual stuff in them. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 20 +++++++++++++++++++- tests/docker/docker.py | 7 ++++++- tests/docker/dockerfiles/empty.docker | 8 ++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 tests/docker/dockerfiles/empty.docker diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index a5c1e4a615..93b29ad823 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -11,7 +11,7 @@ HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles # we don't run tests on intermediate images (used as base by another image) -DOCKER_PARTIAL_IMAGES := debian10 debian11 debian-bootstrap +DOCKER_PARTIAL_IMAGES := debian10 debian11 debian-bootstrap empty DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds @@ -92,6 +92,24 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker { echo "You will need to build $(EXECUTABLE)"; exit 1;},\ "CHECK", "debian-$* exists")) +# These are test targets +USER_TCG_TARGETS=$(patsubst %-linux-user,qemu-%,$(filter %-linux-user,$(TARGET_DIRS))) +EXEC_COPY_TESTS=$(patsubst %,docker-exec-copy-test-%, $(USER_TCG_TARGETS)) + +$(EXEC_COPY_TESTS): docker-exec-copy-test-%: $(DOCKER_FILES_DIR)/empty.docker + $(call quiet-command, \ + $(DOCKER_SCRIPT) build -t qemu/exec-copy-test-$* -f $< \ + $(if $V,,--quiet) --no-cache \ + --include-executable=$* \ + --skip-binfmt, \ + "TEST","copy $* to container") + $(call quiet-command, \ + $(DOCKER_SCRIPT) run qemu/exec-copy-test-$* \ + /$* -version > tests/docker-exec-copy-test-$*.out, \ + "TEST","check $* works in container") + +docker-exec-copy-test: $(EXEC_COPY_TESTS) + endif # Enforce dependencies for composite images diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 39da3fefcf..d28df4c140 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -438,6 +438,9 @@ class BuildCommand(SubCommand): help="""Specify a binary that will be copied to the container together with all its dependent libraries""") + parser.add_argument("--skip-binfmt", + action="store_true", + help="""Skip binfmt entry check (used for testing)""") parser.add_argument("--extra-files", nargs='*', help="""Specify files that will be copied in the Docker image, fulfilling the ADD directive from the @@ -466,7 +469,9 @@ class BuildCommand(SubCommand): docker_dir = tempfile.mkdtemp(prefix="docker_build") # Validate binfmt_misc will work - if args.include_executable: + if args.skip_binfmt: + qpath = args.include_executable + elif args.include_executable: qpath, enabled = _check_binfmt_misc(args.include_executable) if not enabled: return 1 diff --git a/tests/docker/dockerfiles/empty.docker b/tests/docker/dockerfiles/empty.docker new file mode 100644 index 0000000000..9ba980f1a8 --- /dev/null +++ b/tests/docker/dockerfiles/empty.docker @@ -0,0 +1,8 @@ +# +# Empty Dockerfile +# + +FROM scratch + +# Add everything from the context into the container +ADD . /