Message ID | 20230207100744.698694-2-clg@kaod.org |
---|---|
State | Accepted |
Commit | ffd0cac708733ec0e039e3aa8a49f371ac066f36 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp2779883pva; Tue, 7 Feb 2023 02:11:12 -0800 (PST) X-Google-Smtp-Source: AK7set9kSE8xNAWmUglNNda07w6UBWuK4B8mB53rjsMhQFU6wm0q2W6U+cnWnPS5IyN7u+sVT9r7 X-Received: by 2002:a05:622a:1a26:b0:3b9:cd2a:f13d with SMTP id f38-20020a05622a1a2600b003b9cd2af13dmr3752142qtb.59.1675764672197; Tue, 07 Feb 2023 02:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675764672; cv=none; d=google.com; s=arc-20160816; b=sJGy5CuU7P/nU77BPCzQw0id4ORya1pSCvgsWdvmRJX4YVFlGs7lrqE+pD/PIqSamA VOItwWzMemPriEwGqFdW+DBQfQdFTMHAKGoeigIkXCN6QJGYYvMOOuZo+Vjst049ayzn NBMxB5nxXwtRCgrDkYT1DsRs7wOZ7HcO/VR5tI8Pge7voImnMn8Uxc9zKJRxCRcZzzpi NC0bEaUb5FXh/XLYvj+ekHOPn0Kc8sBFQTc7jElqaaZ+mqRKr+POlxqxM7aC63GW1V8p nY7Bo9qb8QmiZ7pzx5o7gl5u6JgR9Ve5TSsRB0TmWisKJQyDFiqLgs18l9ceZY0cGojl PsAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from; bh=TyYCKwrZnDpgNZ4syhoxxhohuXTd9EgetizyUrRIrHA=; b=h2DmrdXpZY7sjPX+u4aOZ9zuccy8ur8RG6iXz8mcVqefvD5Aw0Hv7DDjHKH0Unv/K+ jG6QBiNQBv0CfRUcbXiB/Hnb0XVwwJfQpo5DYj0wnWWVGXewp9JEBoF7KRE8MO9HCryJ r2yu6S8QcXPjMaDda2VfNNfgEAjVVFjE/2Ks7hsrC1CDjN3VStRTX99PsZmoYMfW/LEn 8vxiQrmkGBtMrt6bk4FmIA/G5JoVDWY9kzcnShoxyV3gH7XLbUTtijkEa9x21StuUwaN pX8/Li4jAJYH7hSRgswuyUT/aEgpBQi4L8ryDJ4bVp96LeE/AFHuA26yfNuCM1/xV1vP 5KUw== ARC-Authentication-Results: i=1; mx.google.com; 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" 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 f42-20020a05622a1a2a00b003b0d885a064si10614007qtb.513.2023.02.07.02.11.12 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Feb 2023 02:11:12 -0800 (PST) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1pPKu0-0000XV-3O; Tue, 07 Feb 2023 05:08:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <SRS0=a43c=6D=kaod.org=clg@ozlabs.org>) id 1pPKtS-0000Oz-Az; Tue, 07 Feb 2023 05:08:06 -0500 Received: from gandalf.ozlabs.org ([150.107.74.76]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <SRS0=a43c=6D=kaod.org=clg@ozlabs.org>) id 1pPKtQ-0002Lo-Hn; Tue, 07 Feb 2023 05:08:06 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4P9zMt49ZPz4xwl; Tue, 7 Feb 2023 21:07:54 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4P9zMr5jwKz4wgv; Tue, 7 Feb 2023 21:07:52 +1100 (AEDT) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org> To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= <philmd@linaro.org>, =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org> Subject: [PULL 01/25] tests/avocado: Introduce file_truncate() Date: Tue, 7 Feb 2023 11:07:20 +0100 Message-Id: <20230207100744.698694-2-clg@kaod.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230207100744.698694-1-clg@kaod.org> References: <20230207100744.698694-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=150.107.74.76; envelope-from=SRS0=a43c=6D=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/25] tests/avocado: Introduce file_truncate()
|
expand
|
diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 8c1d981586..13e6688624 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -30,6 +30,11 @@ def pow2ceil(x): return 1 if x == 0 else 2**(x - 1).bit_length() +def file_truncate(path, size): + if size != os.path.getsize(path): + with open(path, 'ab+') as fd: + fd.truncate(size) + """ Expand file size to next power of 2 """