From nobody Mon Sep 28 02:02:43 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1785256813; cv=none; d=zohomail.com; s=zohoarc; b=aUp1GNqp4oLMxLjBuotsJzVUDC3zOmxWnVd+8LeXX2pb+ZXyGPYSKH60MK1iV2kTRTsKAU9J0SEidtoyxQJilbeAQMx9GSPDa6BrBLUacMIdz7nOhSPiDwX6aaBWI+XJEVkXfEAyuqJ7xFjhDv8iC6gDa3AyY6+3o8hkS3CHjZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785256813; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pXlULRQ3xkF+G4ziGLSUPBIsO0q/ag6l0JPYV2U9EqA=; b=l94G0m7IQahfP2f/LcYeGGoWzl14UeyjkWCXPQug2AnjZSllHaO40P0giSljm2btTT4z4p8qjAVgz4db2cwoLHGCXyX2LkW/8tGNe5+kjnQAi3L5rr4bZWI0/L+DrwzTzM4vd4Z52v4xbrMZoEt8EV3nwOqomXur0aZSog4sRu0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785256811157354.7603649026754; Tue, 28 Jul 2026 09:40:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wokqI-00010L-P0; Tue, 28 Jul 2026 12:39:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wokqF-0000zc-H4; Tue, 28 Jul 2026 12:39:43 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wokqD-0004lO-FD; Tue, 28 Jul 2026 12:39:43 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 369861C63C2; Tue, 28 Jul 2026 19:39:33 +0300 (MSK) Received: from gandalf.tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id AE26F3F869D; Tue, 28 Jul 2026 19:39:37 +0300 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 6030629E9D; Tue, 28 Jul 2026 19:39:20 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1785256773; bh=oO3REX05MBkFM/JYl+LUmfk5geaduv1YQ2weccFA7dc=; h=From:To:Cc:Subject:Date; b=nxFLI5keAaDXA9ey+EKYHRx9N+bPgqObJCqLgIfCKFKyXC/zn2REJ06kSNrYVjfD0 qdRHkj9TP7N8/9LBKo+7klSsJ1ysOr/VhuXoT77xXAGqhAE/uBm5iUpioQfKHalshi 2HFy/ajVTLyZpIvE21sXm4x90AbfIowF7CDW/3wztqO+mrBK3SwSyn9qCM8aN2nYvJ lgsWKu59LASFeXICnMSnS4aTgbIyJVICHJXeCmj4lxan6TU9OCLXiO5gbSHBqQlgPT I26jjYfOOyPnMPMakQHFfiyB+dsNSw1b939GHTFQX7yjJNxum9xZqLUvJz0qFU6jc2 +SgRSx8aTfSUA== From: Michael Tokarev To: qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: Michael Tokarev Subject: [PATCH for-11.1?] qemu-iotest 161: fix race Date: Tue, 28 Jul 2026 19:39:16 +0300 Message-ID: <20260728163919.369020-1-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 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=lists1p.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1785256829645158500 qemu-iotest 161 fails intermittedly due to a race condition: qemu:block / io-qcow2-161 ERROR 2.08s exit status 1 =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95 =E2=9C=80 =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95 stderr: Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/161.out +++ scratch/qcow2-file-161/161.out.bad @@ -34,6 +34,8 @@ *** Commit and then change an option on the backing file Formatting 'TEST_DIR/t.IMGFMT.base', fmt=3DIMGFMT size=3D1048576 +qemu-img: TEST_DIR/t.IMGFMT.base: Failed to get "write" lock +Is another process using the image [TEST_DIR/t.IMGFMT.base]? Formatting 'TEST_DIR/t.IMGFMT.int', fmt=3DIMGFMT size=3D1048576 backing_fi= le=3DTEST_DIR/t.IMGFMT.base backing_fmt=3DIMGFMT Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/t.IMGFMT.int backing_fmt=3DIMGFMT { 'execute': 'qmp_capabilities' } This test is run right after a previous test, where we've killed qemu process which holds the test image open. It looks like when the next test is started (with creating the image files), old qemu is still running, so we're racing with that qemu, and qemu-img is unable to lock the image file properly. We can add some `sleep $little-amount` here, but it is simpler and more reliable to just remove the image files, so that new ones are created. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2867 Signed-off-by: Michael Tokarev diff --git a/tests/qemu-iotests/161 b/tests/qemu-iotests/161 index f25effab936..0b8ba0b19e2 100755 --- a/tests/qemu-iotests/161 +++ b/tests/qemu-iotests/161 @@ -106,6 +106,7 @@ echo echo "*** Commit and then change an option on the backing file" echo # Create the images again +rm -f -- "$TEST_IMG.base" "$TEST_IMG.int" TEST_IMG=3D"$TEST_IMG.base" _make_test_img $IMG_SIZE TEST_IMG=3D"$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT _make_test_img -b "$TEST_IMG.int" -F $IMGFMT