From nobody Mon Feb 9 12:11:12 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; dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com ARC-Seal: i=1; a=rsa-sha256; t=1647087368; cv=none; d=zohomail.com; s=zohoarc; b=Lr473oIb37DwEF6JMzFTYM9VO7vtqzZmRq31gjYNWFR7AYVw6PUdRbhnAXxGvwFg+HY2DPXNAwhwVdGe6N5eJMu1rbbkvHZcezos862jAmBJb5Sc+7iX6YMLCZvFcnAcjdKN/REgilmF0s3IAE4fxf/r4GwqJL2qHp1HBESS3uM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647087368; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=TJAeDlUJJUlZd5EXAz9aRvXtuj5klvD+5R2Ki1HIheQ=; b=gkry8kBO0fcwq7AeSJZ3DGUuSgx83lNw8s9ZhCCqrZJVloRm8odqTDEnctrg4aHOxpXwV652kuS2D5aU76qf6Tym1iBAA5Lg3okOdzhFixmxLabX0q6SwKmCDfu8pYzPcfbaq7bPcUOi0VMxc1pdjDZFizZNrgG0fiqFSUJVVJE= 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; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1647087368177416.8402433255096; Sat, 12 Mar 2022 04:16:08 -0800 (PST) Received: from localhost ([::1]:34082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nT0fH-00048G-6v for importer@patchew.org; Sat, 12 Mar 2022 07:16:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT0ao-0006Fl-I6 for qemu-devel@nongnu.org; Sat, 12 Mar 2022 07:11:34 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:35833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT0an-00065Y-4G for qemu-devel@nongnu.org; Sat, 12 Mar 2022 07:11:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=TJAeDlUJJUlZd5EXAz9aRvXtuj5klvD+5R2Ki1HIheQ=; b=dfeEm iXa4OD0kZSWXjKSDCjUqwjrpRTfUEhnyuxT8xP/52am/eDZpUYrC6ob56ss2mSgvgUengfUD0h3q0 W9o8DGgqlZtjdi3gKLhCnyPpXYU7EaXwF8xKUfqwOnz0Mf17E7rjEK6/bHsXGTmK5p0oZAJlvC9ED CFjmjfu6mhJ9WdYur6pr6UBryoINGcfgfIAVysQb/Zs8lZyUiWWPhP9MUSl5ZP/Je6cwnd8fTpaSx AujteIbZwqG9iAoVLq9CH4Z8b54pxfVw1P/EiO6XMqL6RP+trkVwgLUDnSirzbHS9/VXhe6RGfGTW iFi3XcBuwltDh1NliJZhzHhmSqnkA==; Message-Id: In-Reply-To: References: From: Christian Schoenebeck Date: Sat, 12 Mar 2022 12:06:39 +0100 Subject: [PATCH v2 2/7] tests/9pfs: Twalk with nwname=0 To: qemu-devel@nongnu.org Cc: Greg Kurz 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: none client-ip=91.194.90.13; envelope-from=f0d56d86f4d16f6aa712307eeee6964a33f16839@lizzy.crudebyte.com; helo=lizzy.crudebyte.com 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, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @crudebyte.com) X-ZM-MESSAGEID: 1647087369858100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Send Twalk request with nwname=3D0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 22bdd74bc1..6c00da03f4 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -1002,6 +1002,27 @@ static void fs_walk_nonexistent(void *obj, void *dat= a, QGuestAllocator *t_alloc) do_walk_expect_error(v9p, "non-existent", ENOENT); } =20 +static void fs_walk_none(void *obj, void *data, QGuestAllocator *t_alloc) +{ + QVirtio9P *v9p =3D obj; + alloc =3D t_alloc; + v9fs_qid root_qid; + g_autofree v9fs_qid *wqid =3D NULL; + P9Req *req; + + do_version(v9p); + req =3D v9fs_tattach(v9p, 0, getuid(), 0); + v9fs_req_wait_for_reply(req, NULL); + v9fs_rattach(req, &root_qid); + + req =3D v9fs_twalk(v9p, 0, 1, 0, NULL, 0); + v9fs_req_wait_for_reply(req, NULL); + v9fs_rwalk(req, NULL, &wqid); + + /* special case: no QID is returned if nwname=3D0 was sent */ + g_assert(wqid =3D=3D NULL); +} + static void fs_walk_dotdot(void *obj, void *data, QGuestAllocator *t_alloc) { QVirtio9P *v9p =3D obj; @@ -1435,6 +1456,7 @@ static void register_virtio_9p_test(void) qos_add_test("synth/walk/basic", "virtio-9p", fs_walk, &opts); qos_add_test("synth/walk/no_slash", "virtio-9p", fs_walk_no_slash, &opts); + qos_add_test("synth/walk/none", "virtio-9p", fs_walk_none, &opts); qos_add_test("synth/walk/dotdot_from_root", "virtio-9p", fs_walk_dotdot, &opts); qos_add_test("synth/walk/non_existent", "virtio-9p", fs_walk_nonexiste= nt, --=20 2.30.2