From nobody Tue Apr 16 18:42:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555085351; cv=none; d=zoho.com; s=zohoarc; b=jUDlTfC0MbaxndrzIlgUDGR4h4v66+KOD5h0jkKGPvGyNzmRkSnfN32P/eVXLXNW4H4nvlmUR8HDdhu3XJfohQKQ6SWpEh+zHr9v+KZ4IcNQHwYPWqwLLxgXV05nQEU+e5Fv3EY+ZTpwnaMSBSQ2Hnoy12265spePQ66pChKM1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555085351; 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:ARC-Authentication-Results; bh=X5HVtEOardpuz5Cq4gtuDxff0yhuDPdynL7c6moibX8=; b=Q2nlIlalEzcd1K9/E0kUZFl7USzVo/HUP4BR0stmcbU0hBAZA8MUbkLlLg4WzOWAZA2qxnW/zgC7KUOPb3aZ385lmRVYibbA+xqvWAVpW8ITla+v48zg1fyYvYkU5gctuMjjVRi50+FKQKv1HS8mNU5HNnwOD4RipEMkf5oICgA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1555085351107910.7061282395064; Fri, 12 Apr 2019 09:09:11 -0700 (PDT) Received: from localhost ([127.0.0.1]:39495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEyjh-0007DN-1Y for importer@patchew.org; Fri, 12 Apr 2019 12:09:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEyg3-0004f2-66 for qemu-devel@nongnu.org; Fri, 12 Apr 2019 12:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEyg1-0002IM-Ly for qemu-devel@nongnu.org; Fri, 12 Apr 2019 12:05:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEyfw-0002B5-Ul; Fri, 12 Apr 2019 12:05:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5163D30B4A38; Fri, 12 Apr 2019 16:05:08 +0000 (UTC) Received: from linux.fritz.box.com (unknown [10.36.118.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id E857C6134A; Fri, 12 Apr 2019 16:05:05 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 12 Apr 2019 18:04:57 +0200 Message-Id: <20190412160458.23920-2-kwolf@redhat.com> In-Reply-To: <20190412160458.23920-1-kwolf@redhat.com> References: <20190412160458.23920-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 12 Apr 2019 16:05:08 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] iotests: Let 245 pass on tmpfs 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Max Reitz tmpfs does not support O_DIRECT. Detect this case, and skip flipping @direct if the filesystem does not support it. Fixes: bf3e50f6239090e63a8ffaaec971671e66d88e07 Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/245 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 7891a210c1..a04c6235c1 100644 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -209,6 +209,12 @@ class TestBlockdevReopen(iotests.QMPTestCase): =20 # Reopen an image several times changing some of its options def test_reopen(self): + # Check whether the filesystem supports O_DIRECT + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', = hd_path[0]): + supports_direct =3D False + else: + supports_direct =3D True + # Open the hd1 image passing all backing options opts =3D hd_opts(1) opts['backing'] =3D hd_opts(0) @@ -231,9 +237,9 @@ class TestBlockdevReopen(iotests.QMPTestCase): self.assert_qmp(self.get_node('hd1'), 'cache/writeback', True) self.assert_qmp(self.get_node('hd1'), 'cache/direct', False) self.assert_qmp(self.get_node('hd1'), 'cache/no-flush', False) - self.reopen(opts, {'cache': { 'direct': True, 'no-flush': True }}) + self.reopen(opts, {'cache': { 'direct': supports_direct, 'no-flush= ': True }}) self.assert_qmp(self.get_node('hd1'), 'cache/writeback', True) - self.assert_qmp(self.get_node('hd1'), 'cache/direct', True) + self.assert_qmp(self.get_node('hd1'), 'cache/direct', supports_dir= ect) self.assert_qmp(self.get_node('hd1'), 'cache/no-flush', True) =20 # Reopen again with the original options --=20 2.20.1 From nobody Tue Apr 16 18:42:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555085238; cv=none; d=zoho.com; s=zohoarc; b=S8LHKjrX6T5wFsr8Qbw5OgBf+KSsg1SIzMHHNoGDN3tIEyG0vmuJsrUF11kCAmEkQ1YWlJy4Te15Z8jxRs07122kEYSWMF6bJK+dHpo6vKU/V7JYNcvIS/r9rey5uibLu6r/ydsfc+8bjxHpDyJjzBSytIAnp2JSfNDbj3A8VA4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555085238; 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:ARC-Authentication-Results; bh=XT3HjG01VpxgjmXITTSTrvomoUDklUEBVfgyYLZKv3A=; b=eGApOMWTB7kt2ww7OeBblq6Vulr/srpRUl+N11BKS74nIfU1ssqiP3IdgmkpJc8HS3QvnJG0FPHX4gSodkztQRago8w5Wr5bh67khGwpYefyfCdIJNWh3uwGIzlolm9zGQGqDu4w7RhRgJihOiuAwkN+bZBq3N02FuhzkQ5aJRs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1555085238598227.00552335261455; Fri, 12 Apr 2019 09:07:18 -0700 (PDT) Received: from localhost ([127.0.0.1]:39477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEyhu-0005m4-KS for importer@patchew.org; Fri, 12 Apr 2019 12:07:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEyg3-0004f4-6k for qemu-devel@nongnu.org; Fri, 12 Apr 2019 12:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEyg1-0002IR-NH for qemu-devel@nongnu.org; Fri, 12 Apr 2019 12:05:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34744) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEyfx-0002Ea-DX; Fri, 12 Apr 2019 12:05:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 621A730BC644; Fri, 12 Apr 2019 16:05:10 +0000 (UTC) Received: from linux.fritz.box.com (unknown [10.36.118.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A9F16014E; Fri, 12 Apr 2019 16:05:08 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 12 Apr 2019 18:04:58 +0200 Message-Id: <20190412160458.23920-3-kwolf@redhat.com> In-Reply-To: <20190412160458.23920-1-kwolf@redhat.com> References: <20190412160458.23920-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 12 Apr 2019 16:05:10 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] iotest: Fix 241 to run in generic directory 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Eric Blake Filter the qemu-nbd server output to get rid of a direct reference to my build directory. Fixes: e9dce9cb Reported-by: Max Reitz Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/241 | 4 +++- tests/qemu-iotests/241.out | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/241 b/tests/qemu-iotests/241 index 4b19685738..017a736aab 100755 --- a/tests/qemu-iotests/241 +++ b/tests/qemu-iotests/241 @@ -28,6 +28,7 @@ nbd_unix_socket=3D$TEST_DIR/test_qemu_nbd_socket _cleanup() { _cleanup_test_img + rm -f "$TEST_DIR/server.log" nbd_server_stop } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -69,12 +70,13 @@ echo =20 # Intentionally omit '-f' to force image probing, which in turn forces # sector alignment, here at the server. -nbd_server_start_unix_socket "$TEST_IMG_FILE" +nbd_server_start_unix_socket "$TEST_IMG_FILE" 2> "$TEST_DIR/server.log" =20 $QEMU_NBD_PROG --list -k $nbd_unix_socket | grep '\(size\|min\)' $QEMU_IMG map -f raw --output=3Djson "$TEST_IMG" | _filter_qemu_img_map $QEMU_IO -f raw -c map "$TEST_IMG" nbd_server_stop +cat "$TEST_DIR/server.log" | _filter_testdir =20 echo echo "=3D=3D=3D Exporting unaligned raw image, forced client sector alignm= ent =3D=3D=3D" diff --git a/tests/qemu-iotests/241.out b/tests/qemu-iotests/241.out index f481074a02..75f9f465e5 100644 --- a/tests/qemu-iotests/241.out +++ b/tests/qemu-iotests/241.out @@ -10,13 +10,13 @@ QA output created by 241 =20 =3D=3D=3D Exporting unaligned raw image, forced server sector alignment = =3D=3D=3D =20 -WARNING: Image format was not specified for '/home/eblake/qemu/tests/qemu-= iotests/scratch/t.raw' and probing guessed raw. - Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. - Specify the 'raw' format explicitly to remove the restrictions. size: 1024 min block: 512 [{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true, "o= ffset": OFFSET}] 1 KiB (0x400) bytes allocated at offset 0 bytes (0x0) +WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. + Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. + Specify the 'raw' format explicitly to remove the restrictions. =20 =3D=3D=3D Exporting unaligned raw image, forced client sector alignment = =3D=3D=3D =20 --=20 2.20.1