From nobody Mon Feb 9 14:15:56 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=1655379487; cv=none; d=zohomail.com; s=zohoarc; b=jZ9jzghnRi+gZUL3a2STnoSP6ryAvCZ0G+bmll72dJmFoK3n8EkJx8PL7TweS3g8zvNWZw8dWOZcyzrsJUaWytlyBaptHN4wZioPcHwwJJY0ybgl/XWe4HRAIa857LN2Mf9EKh10PjL/D4uffGJBSuyXoYQQnC4PxG35dZaspsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655379487; 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=Sv3a/9mZpqBDK1dfzgFGiGVNXR8FfCfqve5RJdbsVh0=; b=DBOtd4lmyVa+fkpdblJ6AzCM7R4kFDogdYT8fyDAt3Sqin6Itr9qF/HpRJCtWmKN7TYNDpW6JOnbNWggL0rYH6sMwqCi/givI+N938iid3+ZcKFXzX4gdCRgT3QrM27ernWvO5MNUEqPEl2c0y7bJu29Kdg9/5Dh1l4hGoBsayA= 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 1655379487644633.6587965942318; Thu, 16 Jun 2022 04:38:07 -0700 (PDT) Received: from localhost ([::1]:55620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1np7-0006N1-Mq for importer@patchew.org; Thu, 16 Jun 2022 07:38:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1nLa-0007Ek-5Y for qemu-devel@nongnu.org; Thu, 16 Jun 2022 07:07:35 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:45745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1nLY-0003IC-Lm for qemu-devel@nongnu.org; Thu, 16 Jun 2022 07:07:33 -0400 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=Sv3a/9mZpqBDK1dfzgFGiGVNXR8FfCfqve5RJdbsVh0=; b=g1a/j UIO1uKieEbBrw/uoLNc5Ah3GGYNhBOlS+qqzkti5R6pdpWUG77xWHAmnyCcSyROEwMGAC+r8QK6KM 0gQBu8W/zgMWdwbIl9HJHr/9RrasC+GfdO97pZ0D0GE7mWRJfwh1A2Du6LpD8NFVp+K5Zr7c0cpu5 p3Lg9V0WvzkyeuehP0G/cMvEDZH381+Nr2iXc/9H2GD4WpvBk72QMfUPiJeQJXpZgxk+NPmTOf815 l0gK2qXVtYPKCZZuVcLNAOnc0/L69ofD5umvrHH04A2w30hVagi2/hTbakI+of5KwdocwuEZM/EbM 11TIHFOR2BKFkASfyhgcf8HIuhYuw==; Message-Id: In-Reply-To: References: From: Christian Schoenebeck Date: Thu, 16 Jun 2022 13:00:04 +0200 Subject: [PULL 2/7] tests/9pfs: Twalk with nwname=0 To: qemu-devel@nongnu.org, Peter Maydell 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=c1668948e8b74cd8f912054ba4412a1cbf0cd03c@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: 1655379489131100001 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 Message-Id: --- 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 b3837546be..7942d5fef9 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