From nobody Mon Nov 17 22:26:22 2025 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1605634802; cv=none; d=zohomail.com; s=zohoarc; b=Qk2Z+MhALzvkCZeYMvjsOG5sGr+dXMhEYWuM+69BFiZWD6WQculmfRgkNIZOtgcvT6ZCJxWGHoXXGSzzfUA7x8TZVsZcUZAutuEsviwIXIFIS1T7agBXPPK+TowXyN/ebwMxF69nNE3vsG0m1LGklWCpxN6iRKY6/DTOY7fdkF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605634802; h=Content-Type: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=iZ6emmsVGopMBicjEoGUTBo8VBEOaBaz0b4I5fK20m8=; b=lsyWvO43+/pPlkBHSg82SztaLJ9cXCyX7B0SblBDEs5luQOBk62YtiGe4OlmO6eSEer4F8/n+QYwd+OjBEcFXLtzpCJfjok+l4YLpFPvwTddjA07NkdqUEYe763JHGd8nn2gMG7cAXWpCdRxLL9FpUdlQb0NYrJ1RsbdaUvJ1Ms= 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 1605634802355457.43682583471355; Tue, 17 Nov 2020 09:40:02 -0800 (PST) Received: from localhost ([::1]:60380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf4xV-0006iG-7w for importer@patchew.org; Tue, 17 Nov 2020 12:40:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf4uL-0001ld-RH for qemu-devel@nongnu.org; Tue, 17 Nov 2020 12:36:45 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:38630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kf4uJ-0006Mf-66 for qemu-devel@nongnu.org; Tue, 17 Nov 2020 12:36:45 -0500 Received: by mail-wm1-x334.google.com with SMTP id 1so2499628wme.3 for ; Tue, 17 Nov 2020 09:36:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 31sm6889143wre.43.2020.11.17.09.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 09:36:37 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A56F41FF8F; Tue, 17 Nov 2020 17:36:35 +0000 (GMT) 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=iZ6emmsVGopMBicjEoGUTBo8VBEOaBaz0b4I5fK20m8=; b=mTZhIZwmq/aPdobm+ylhLINwVqdw23gHoYv5vTN8s0SnP7XZ9Pz34n8nP93OUz75o7 muKrCLpVMtgt0oFXbBe4RmDBJ8EYnyPX784bOty9rQS3wCKS4HG8xsoaMo43laFWkAza kmy+4exEKfFKItKeCUfxnZQ7zhBHunOu1ZTe9MEr8xFK/0kI7yHAHY0o8Av1Gn0w9sh/ XwIBauXe8Xm+T1/ckQqBcYvFV6QHJwowwwQhXahees0bxtyfp5zdHngnkQLH85+iLrKL Inv43AUTErxULyYPiWOllnGjl5xS7IuzxtEmvQmE9sXsdatA2fZ8SLZYc7Wv+F5xO/Xd ET1Q== 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=iZ6emmsVGopMBicjEoGUTBo8VBEOaBaz0b4I5fK20m8=; b=pIrFWFjUVQkzN5pYEK1NdnRTRiSIt/f1Jp1PQXELEbZKbzSTSp5AOjq/iZiZBNcq7i YDCpyqCw5ZKxoma8mnCE4+KQuylo6rxDkRTIK+nvoM9z/tyg9quw46G62+KjftUe5ijv XO5oqkpKle9janaCJXz0RP6a4zT3AfTwIWrpBsm39ur1/UbXgldNKc1ygwVRdvZrgEVo JiZrRuotjCr12f8nawXEQzyPzUvRgMI7LEiwlOullhEsMD2NGwxC08/VLWMRkwPs9v9H 7RyupvvU/U1Yjq15UbEgQpFZZcwtXjZ3k9B9FMtRRl2a4T6yaxPks3nCYKwVBOXCokX2 W58A== X-Gm-Message-State: AOAM532tWtvQFwrOSimiPH7Pz94U0kot8IgyUK7reT6LofEsPDCrrteN HzIr538kgbWqZoYs9RVo2A34wQ== X-Google-Smtp-Source: ABdhPJy1DdftWS9IGZaLsK4wRjPMBE80qT1sRFfVWdj+l8bSV0uXHL3RLdGxoFlInd5Md92IMxGcNw== X-Received: by 2002:a1c:d0:: with SMTP id 199mr194149wma.148.1605634601911; Tue, 17 Nov 2020 09:36:41 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/6] tests/avocado: clean-up socket directory after run Date: Tue, 17 Nov 2020 17:36:32 +0000 Message-Id: <20201117173635.29101-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201117173635.29101-1-alex.bennee@linaro.org> References: <20201117173635.29101-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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 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: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Previously we were leaving temporary directories behind. While the QEMUMachine does make efforts to clean up after itself the directory belongs to the calling function. We use TemporaryDirectory to wrap this although we explicitly clear the reference in tearDown() as it doesn't get cleaned up otherwise. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Wainer dos Santos Moschetta --- tests/acceptance/avocado_qemu/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 3033b2cabe..bf54e419da 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -171,8 +171,8 @@ class Test(avocado.Test): self.cancel("No QEMU binary defined or found in the build tree= ") =20 def _new_vm(self, *args): - sd =3D tempfile.mkdtemp(prefix=3D"avocado_qemu_sock_") - vm =3D QEMUMachine(self.qemu_bin, sock_dir=3Dsd) + self._sd =3D tempfile.TemporaryDirectory(prefix=3D"avo_qemu_sock_") + vm =3D QEMUMachine(self.qemu_bin, sock_dir=3Dself._sd.name) if args: vm.add_args(*args) return vm @@ -193,6 +193,7 @@ class Test(avocado.Test): def tearDown(self): for vm in self._vms.values(): vm.shutdown() + self._sd =3D None =20 def fetch_asset(self, name, asset_hash=3DNone, algorithm=3DNone, --=20 2.20.1