Message ID | 20200724064509.331-10-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2186420ilg; Thu, 23 Jul 2020 23:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwQllx2T9eXCR13cJ2KXx3BtTze+P2jTkkuLmiYlp2TjI/S+oIdd87LR4wU3xEmL1t9P93 X-Received: by 2002:a25:8503:: with SMTP id w3mr11339829ybk.2.1595573515943; Thu, 23 Jul 2020 23:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595573515; cv=none; d=google.com; s=arc-20160816; b=H3ZF0/SVsEg3Rcz1ELxWHWXrvDExAvHMEgdQhQHoEDBUIHUnDxbQrBh10h1o8OZy6M CfExnY1DbsEpXVrSX5vriUlAvrY9AMY/GKQ2LY8aqQIN54KeoDXV9nDWZqAIP9xNJHse shzpkSnXXSZDCJEcXLih92lgGORX2Bvnf9uOsPz6gqn0vNJkefzEGQ1sP+qI0PXFo2Uf CUwI8vTY727U3nx4zo+7zR/4HM4bpgjskCxEedwOHlupY68y0EXGkjuaqWKtmiPrxOto CQ9gPV9fBglo8aHQwOXSsvPWuvaBeFdgP9Hl7e3ol62Z7gSYacwgi8cCawpPbR9Vv+Pn tGNA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=bBHLOf2caPKPYUmFKO5eX0gKvXVT+aR9KRaX+uIZvh0=; b=zbpHWuRP4ByDof5AkJoW+qU6rb6gHzew7VNddp6C8xCYPDrlby1ZdztnJFWPj34N2s ITmx13Qhd5fErm/bpYAF1J2J6YLeQUWEl2W13AWiaKJQxNqgPiSmK1wQrEOxgj0z/Tut SZYNLBOYZ58rczRHSQhw91w5FqNN71HPQvpfu/dt2gzsvAjtcs8zMTPg+yJ7R27ZIeI2 8crEoLr0BkveqLp26vdq3jQE5jC/OXpB/JChwqQBO6qWL9DGoyClWQUlJZFOT+IxLZ/1 7xAqtiL7cO/jfWgEzkjqj3ILe4bx032alR6PVHdq10Bvayga+PBIPdie7areXY9c1FDu JtjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=m4Jz8v2l; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e8si5305022ybc.421.2020.07.23.23.51.55 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Jul 2020 23:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=m4Jz8v2l; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:34532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1jyrYh-00058f-Dz for patch@linaro.org; Fri, 24 Jul 2020 02:51:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1jyrSS-0004I0-Gw for qemu-devel@nongnu.org; Fri, 24 Jul 2020 02:45:29 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1jyrSO-0000LG-LC for qemu-devel@nongnu.org; Fri, 24 Jul 2020 02:45:28 -0400 Received: by mail-wr1-x444.google.com with SMTP id r2so2165304wrs.8 for <qemu-devel@nongnu.org>; Thu, 23 Jul 2020 23:45:24 -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=bBHLOf2caPKPYUmFKO5eX0gKvXVT+aR9KRaX+uIZvh0=; b=m4Jz8v2lJggWycIJbEITQmGAIvP6WoXc1zQwbGFwbp/PrTW8Xt87tPWRczqgEhVPOq X57w9FsDEOkxtfjgAZ/Kh3q7QAvccqA9CKmwY6mweKO2Qjradqcu4Xbp89yDLfd5Fala m9oUprl1MBGXppzURqtoBdHGXHfp/0bppQtLNZsjbESmW2umhd8RVqvqp+yifoih2sXw kfqZtejQvDFajwVAE/8b2DIpjKANOrAX+UKXS2ssJL2+/PtBFAEdUtYC721EhtHRNZM6 rDZ1rP+ObKeAm05mLXZ1FiemvzqWpoeo1pVYCmzwsNJManTzKksbVbKBX9/eQti9/hV0 tMXw== 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=bBHLOf2caPKPYUmFKO5eX0gKvXVT+aR9KRaX+uIZvh0=; b=NOpQDekBS/kuI4qhAoS6iaGx8kIJ5hO9iILYGiunffKYTXpMqtyi9FnVJGkwSV1Xi8 n00zlkIo66kE5TT28SpqfTZiduRQ5GpdxgJotjnb2u6UfsHcVN8Fk42awKdApeRe0rVf tY+rcaJwWiT3lar96Eso0+DzORxPJuLXdrCvK5+tivOPa2biOFOYkG1nyvhGLd5hMRdO 5fz90W/7Hp0+r0QM3izOYUNkYfSionwwR+zSpL5m5xkGQ64wip/cPO1MZQXeUp10oIPt wdMqmw7vrYBnt05P1LuaHi1e9U6s3mx4q/Ye5qBXKW1CQbd/l7iHceI3O4x2UfzgNL89 cA9A== X-Gm-Message-State: AOAM533MkYUHutHfPRzKW1U+jpgMkt1NogQOklOCnJmuAsWpFm/xMf/k wwqZYSbIQPdUhcs/FqXtYvc4UA== X-Received: by 2002:adf:83c5:: with SMTP id 63mr7036489wre.321.1595573123304; Thu, 23 Jul 2020 23:45:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v1sm126517wro.83.2020.07.23.23.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 23:45:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0C3151FF98; Fri, 24 Jul 2020 07:45:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v3 09/16] tests/docker: fix update command due to python3 str/bytes distinction Date: Fri, 24 Jul 2020 07:45:02 +0100 Message-Id: <20200724064509.331-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724064509.331-1-alex.bennee@linaro.org> References: <20200724064509.331-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, URIBL_BLOCKED=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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: fam@euphon.net, berrange@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= <philmd@redhat.com>, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
candidate fixes for 5.1-rc1 (testing, semihosting, OOM tcg, x86 fpu)
|
expand
|
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index c9f20d8d093..356d7618f1a 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -24,7 +24,7 @@ import tempfile import re import signal from tarfile import TarFile, TarInfo -from io import StringIO +from io import StringIO, BytesIO from shutil import copy, rmtree from pwd import getpwuid from datetime import datetime, timedelta @@ -541,13 +541,14 @@ class UpdateCommand(SubCommand): # Create a Docker buildfile df = StringIO() - df.write("FROM %s\n" % args.tag) - df.write("ADD . /\n") - df.seek(0) + df.write(u"FROM %s\n" % args.tag) + df.write(u"ADD . /\n") + + df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) df_tar = TarInfo(name="Dockerfile") - df_tar.size = len(df.buf) - tmp_tar.addfile(df_tar, fileobj=df) + df_tar.size = df_bytes.getbuffer().nbytes + tmp_tar.addfile(df_tar, fileobj=df_bytes) tmp_tar.close()
Does this seem convoluted to you? It feels a little complicated to me. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200722062902.24509-10-alex.bennee@linaro.org> --- tests/docker/docker.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) -- 2.20.1