From nobody Sun Feb 8 16:05:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1536572224334513.5295348031378; Mon, 10 Sep 2018 02:37:04 -0700 (PDT) Received: from localhost ([::1]:50586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzIcx-0000GG-47 for importer@patchew.org; Mon, 10 Sep 2018 05:37:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzIae-0006XK-B4 for qemu-devel@nongnu.org; Mon, 10 Sep 2018 05:34:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzIWk-0006aZ-40 for qemu-devel@nongnu.org; Mon, 10 Sep 2018 05:30:43 -0400 Received: from fanzine.igalia.com ([91.117.99.155]:59715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fzIWU-0005vx-6N; Mon, 10 Sep 2018 05:30:28 -0400 Received: from 91-158-71-53.elisa-laajakaista.fi ([91.158.71.53] helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1fzIVq-0002W3-Jj; Mon, 10 Sep 2018 11:29:42 +0200 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1fzIVc-00066C-1o; Mon, 10 Sep 2018 12:29:28 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Message-Id:Date:Subject:Cc:To:From; bh=F/xdAFOkkc0HvGDNDJ3hTexh5L9McysYsih/OjjbrBo=; b=X5lw1xyDBHB/AHSDIyqWcs8b4+ZQQyO6Q2iKT7CpHqmLJOiVHGFODqsuqVHc+pmRdgvo05oNExEMAKW0wpFHAul/yjeI/N6xVTnnQGgY2k6yovksvVmh3ETk0u1U8nAPUapd6klpH6xTergqAu0v4qcDnX+Z/5/fL64yjeLLMOz+nJoRaGqllv4sWYbQiAX6eHM0fiT0P9zAiw5vroWbewejq6GcKY0LkValpoW2feqmHN1JPjtYgqAjLsJL7r42BodOavBV1KVXqC2eebtb+lygJckTq8dXCfOMIAjFVG/wIOd1DpPHqyvCrk6BYRqQcOt8rhjO1f0CESnQkOqMtw==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Mon, 10 Sep 2018 12:29:23 +0300 Message-Id: <20180910092924.23403-1-berto@igalia.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH] qemu-iotests: Test snapshot=on with nonexistent TMPDIR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We just fixed a bug that was causing a use-after-free when QEMU was unable to create a temporary snapshot. This is a test case for this scenario. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/051 | 3 +++ tests/qemu-iotests/051.out | 3 +++ tests/qemu-iotests/051.pc.out | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index ee9c820d0f..25d3b2d478 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -354,6 +354,9 @@ printf %b "qemu-io $device_id \"write -P 0x33 0 4k\"\nc= ommit $device_id\n" | =20 $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io =20 +# Using snapshot=3Don with a non-existent TMPDIR +TMPDIR=3D/nonexistent run_qemu -drive driver=3Dnull-co,snapshot=3Don + # success, all done echo "*** done" rm -f $seq.full diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index b7273505c7..793af2ab96 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -455,4 +455,7 @@ wrote 4096/4096 bytes at offset 0 =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Testing: -drive driver=3Dnull-co,snapshot=3Don +QEMU_PROG: -drive driver=3Dnull-co,snapshot=3Don: Could not get temporary = filename: No such file or directory + *** done diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index e9257fe318..ca64edae6a 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -527,4 +527,7 @@ wrote 4096/4096 bytes at offset 0 =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Testing: -drive driver=3Dnull-co,snapshot=3Don +QEMU_PROG: -drive driver=3Dnull-co,snapshot=3Don: Could not get temporary = filename: No such file or directory + *** done --=20 2.11.0