From nobody Mon Feb 9 08:11:50 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1597967851; cv=none; d=zohomail.com; s=zohoarc; b=CJkaxYb4RkE/3AxnAiAO8/f5xEEsxDt+VqKlTc/1Vzkw6xbJRmz9h8InYzevMejvPe76TiMzmlRwlP3vHH4pi6CmooLMoaJiawbh8DZy9nJ8Wl0exGaU2MmcBRffMxHT0I/2es8S4DOCZXAl6yE/tZ/vyL23DhFehapFUCWDV8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597967851; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JyZ42iytgyulxF3b/igSJBiCpRIiXynOvr9XqZCe6AQ=; b=lqeDW6fHxJh0R9eIoHrQC6TKq8QyRbYGvbPVWh5smRpI1DDNgH56YXQzh5VHXjaxHQNuaeXIWt8KwLqzN7yZ5cmx/dZAd6vHJq6A073B9w69+04xlIN5BR0CqYkDUGXKzeL5pd/v2VoEGSuzTsDUN4VNMzXtYoFhGIKgUt6eNDU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597967851177445.49044260403264; Thu, 20 Aug 2020 16:57:31 -0700 (PDT) Received: from localhost ([::1]:40044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8uQz-00055D-U7 for importer@patchew.org; Thu, 20 Aug 2020 19:57:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8uOD-0000IY-Hc; Thu, 20 Aug 2020 19:54:37 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8uOB-000712-UM; Thu, 20 Aug 2020 19:54:37 -0400 Received: by mail-wr1-x441.google.com with SMTP id l2so339376wrc.7; Thu, 20 Aug 2020 16:54:35 -0700 (PDT) Received: from localhost.localdomain (109-186-18-89.bb.netvision.net.il. [109.186.18.89]) by smtp.gmail.com with ESMTPSA id o128sm556506wmo.39.2020.08.20.16.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 16:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JyZ42iytgyulxF3b/igSJBiCpRIiXynOvr9XqZCe6AQ=; b=sbtoQxF0Ljo53A4d8raN0AYvL6SC7z15jKoqCjtGJjRVzY5k9GKMerkXvVhC2FS+hJ s2BJ5wYRNnn0wfzFLnGfQCVxVgpJbtph2uxESVX6wzB5fm0GqHYfyUumXdh2G5YucivQ yd2JpnQdOrnikV6tWZJv8D02N8hFfxCxKRIEtXZnVDAKz56O5VEaaXgUtOWv41EPOoKn NDmUmVTc4u9uCWqT2Y48cs0q8E1r4Xr4HwimDbITFuVxh4stBJIE39NP1oEvI5iKN2ua WMwnzbFzD6enL76GBy2FOgvjmh44ckjw1weQq3OuLigwHCZ79L/L79CVd/oGjpau3IqD 7ZWQ== 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=JyZ42iytgyulxF3b/igSJBiCpRIiXynOvr9XqZCe6AQ=; b=dgycLcRGQir7pCx9Dvno9ujjKEh3+cvNUPks6rVlyO+wIRX0UsGA6XEiji3tyG1js8 BEhcQ3Nq0+ABZP7UomZHnSJpQzrt2GoVTOP56WtXzM2plQVwCcJyPZDLigAQAfhG37FK dWgmNnKtBM5nOrEP+xJOefaga0B5teuDltGMGl5NI4YFBfs8jxDkH4cm91DMD6NWOKml QdxFkws2f0YWLgT5AWg+sVVwUTlnz8MGdMyirIm59TZ+RShO+um7f272h18cZiuDypnc 6W2WtpxN6ddtSy29tFHqLH//2fqe14NK7Q+3WJbxrzm515oggXMFuRL9mApdbnUUAJSe cHyw== X-Gm-Message-State: AOAM533c39R7KylswZ9gEcs3k1RR7p5nTrek1LNv8YsHZq2+A4Eohz43 53bUJ+Icrh7Kgmzog0E7DgBW6p0Vtlo6Q2Aq X-Google-Smtp-Source: ABdhPJxvad/NuMT4ZgAWJh2LT4HCaPJX/NfmJB8Ts+KlG+BgfNaKKtQvX/t5pgJiabod53xM9+00+A== X-Received: by 2002:adf:9561:: with SMTP id 88mr165827wrs.240.1597967673960; Thu, 20 Aug 2020 16:54:33 -0700 (PDT) From: Nir Soffer X-Google-Original-From: Nir Soffer To: qemu-devel@nongnu.org Subject: [PATCH v2 2/5] qemu-iotests: Fix FilePaths docstring Date: Fri, 21 Aug 2020 02:54:24 +0300 Message-Id: <20200820235427.374645-3-nsoffer@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200820235427.374645-1-nsoffer@redhat.com> References: <20200820235427.374645-1-nsoffer@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=nirsof@gmail.com; helo=mail-wr1-x441.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, FREEMAIL_FROM=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, John Snow , Max Reitz , Nir Soffer Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When this class was extracted from FilePath, the docstring was not updated for generating multiple files, and the example usage was referencing unrelated file. Fixes: de263986b5dc Signed-off-by: Nir Soffer Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 16a04df8a3..f34a1d7ef1 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -450,14 +450,16 @@ def file_pattern(name): =20 class FilePaths: """ - FilePaths is an auto-generated filename that cleans itself up. + Context manager generating multiple file names. The generated files are + removed when exiting the context. =20 - Use this context manager to generate filenames and ensure that the file - gets deleted:: + Example usage: + + with FilePaths(['test.img', 'test.sock']) as (img_path, sock_path): + # Use img_path and sock_path here... + + # img_path and sock_path are automatically removed here. =20 - with FilePaths(['test.img']) as img_path: - qemu_img('create', img_path, '1G') - # migration_sock_path is automatically deleted """ def __init__(self, names, base_dir=3Dtest_dir): self.paths =3D [] --=20 2.26.2