From nobody Mon Feb 9 16:50:52 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=1597967763; cv=none; d=zohomail.com; s=zohoarc; b=RuiCupNzq+BMk9u7VkbxYCCcoXwX+6Lsk9eaN85CnxTaUbO2oREUYucBof3tDjojNO+2IVkBJuQ//Im2NpX9gneIwYiS9+77a5yymJuQIBW50OCSs4yZBBHZAbL5c35N8tMDB4v+RcrQPHwwNpqJJ0l0vrJZHA6yoSNlu1jgPL4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597967763; 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=dEMPiCqe9PefxpWTTe3SJ7uQAbS0drp2NTOLNfe8U44=; b=BeY9GgdCAZuOvFNXPAcVFlE5VMlx8od4BbwzTLnx3nl7S87K6qo4985I9Q5DjyftOuea9/wLlGZV8EbPUm8VEwVBCp349mO25Hu5W3UJ5shmC5bGiJfgfu2Oc3e9MkYUB8Wvp5ALBDB4jp4sHoGENS8IlhGiLm8/FUPyQW3M1fs= 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 1597967763033635.0166283976729; Thu, 20 Aug 2020 16:56:03 -0700 (PDT) Received: from localhost ([::1]:60904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8uPZ-00020i-Iz for importer@patchew.org; Thu, 20 Aug 2020 19:56:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8uOC-0000H2-G2; Thu, 20 Aug 2020 19:54:36 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:40736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8uOA-00070m-L4; Thu, 20 Aug 2020 19:54:36 -0400 Received: by mail-wr1-x443.google.com with SMTP id l2so339337wrc.7; Thu, 20 Aug 2020 16:54:34 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 16:54:31 -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=dEMPiCqe9PefxpWTTe3SJ7uQAbS0drp2NTOLNfe8U44=; b=kQM2m0OYVuLBN6jSDlqJlSz6hPWcob2zyci9GLLCFUKYBdgmAWHr4wpkxt0V3fRuKn kiiDGhmJcZJPUL4kvhz0YtcmGsRrFHVvxcIv1CuQUM0jE1WGWTnqvHKxHoB/7LOZVrk4 P87pelL9m3Vs7lTXcJ52yx43BADmwAecKHs+C30NGqQgRuWVrshHv4D/9WZiBZRGXHF6 eEVpcV9lx7+a6An7F47Fjt/7wSTaWFERP3ywJm2x2u9bWXbBED8+on7805R76FkErRm3 xKYlQHhuzQ/iOM9vN+qep1ZVaKbzTz1xmNSauY6EyTjhSQ2T9udrSFilS9YKGP2or0Dt VwVA== 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=dEMPiCqe9PefxpWTTe3SJ7uQAbS0drp2NTOLNfe8U44=; b=q/YUsZ8SKMkreTYaZubcVl2694Jax4g+VZrNKS0cYrVBU0/0XDkPXduvYxpH0YVoQm nrGUG6sYNHFubJsavk09hw/a4RJOJAI8uWbAjgl1eNGHb4giyDNM1pa+saBjyF6VfuQ+ 2f1IUK+9JNhHa3D1VL0mVcxOBMHYYozgMljGyZfPo570Evv91QS0K2o5Hr5R+8xKEAd6 howeVJcTO7VLT6Q1PkuD6c1kFc7gPLCpp+xNZeGwXNE4wxeVvd0eOMs5GDtnAGkKY8KI 3s0SnPNrgvTmVTQc7EYDc5LrnxoplJueTOZEzqEzgOtRqcZ98hK0uiDHdLhlvqFrRyqd pCTw== X-Gm-Message-State: AOAM5322zNs+AoR4ThoNlp0aUiDKmPf6Jd3NeEIuQ9JpkCiAFOxamtWL xuSKwOX/lEnoF6LEinGklGD4tyGEljHfnL8/ X-Google-Smtp-Source: ABdhPJwahq30JprhS/yA4Rb8O051zjWBIvx9eWrphPvKHw8RrOdVdQ/bR0sL6XTB4FL+S8uxyali4A== X-Received: by 2002:adf:80c7:: with SMTP id 65mr153449wrl.35.1597967672431; Thu, 20 Aug 2020 16:54:32 -0700 (PDT) From: Nir Soffer X-Google-Original-From: Nir Soffer To: qemu-devel@nongnu.org Subject: [PATCH v2 1/5] qemu-iotests: Fix FilePaths cleanup Date: Fri, 21 Aug 2020 02:54:23 +0300 Message-Id: <20200820235427.374645-2-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::443; envelope-from=nirsof@gmail.com; helo=mail-wr1-x443.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" If os.remove() fails to remove one of the paths, for example if the file was removed by the test, the cleanup loop would exit silently, without removing the rest of the files. Fixes: de263986b5dc Signed-off-by: Nir Soffer Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 717b5b652c..16a04df8a3 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -468,11 +468,11 @@ class FilePaths: return self.paths =20 def __exit__(self, exc_type, exc_val, exc_tb): - try: - for path in self.paths: + for path in self.paths: + try: os.remove(path) - except OSError: - pass + except OSError: + pass return False =20 class FilePath(FilePaths): --=20 2.26.2