From nobody Mon Feb 9 19:53:57 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=1646853504; cv=none; d=zohomail.com; s=zohoarc; b=T3bRZ1xcsq7jFWQgFAJ49FPdpWAnbGrA7aS70O4MDdTQT9PSZsuFUPxJsTGJH2a44uMWW9BCxK29VT3PEJEeaPVzzbISqgWHpBQDpizD3dO2WU4cHfC9D2BlZc6GEqfeN4LYdpWIBELAC+lE0X8a0q1iJU0A5vfJ8pygnc/ZaSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646853504; 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=YqbY9vNfa/EmSihxfkUi13kl4TtM5o1x5zqFLwyXJpk=; b=iJ4q5wWMdfTrfj9z4RpPbCRQAdDytZCRcQUk7LlNAtF/QtlWgkAi85UogpQ4UrSN7pef3GEUYNiAHCe9eQgaLLEqybrvSSNd7NUQxVbf8Qighp1rOoK+YsVcF2lWewoO1wTERyFXiTmHOak1GfZMZpk6gp9b4KAYlNZthr8WxA4= 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 1646853504085844.8665200065229; Wed, 9 Mar 2022 11:18:24 -0800 (PST) Received: from localhost ([::1]:58382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nS1pG-0005XY-Dv for importer@patchew.org; Wed, 09 Mar 2022 14:18:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS1ky-00023p-TY for qemu-devel@nongnu.org; Wed, 09 Mar 2022 14:13:56 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:37337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS1kx-0004oT-CS for qemu-devel@nongnu.org; Wed, 09 Mar 2022 14:13:56 -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=YqbY9vNfa/EmSihxfkUi13kl4TtM5o1x5zqFLwyXJpk=; b=GF+Sn 3PCHQjqbbMUJGJgtj6mpia5DXiT/48iB9s6Tg53bpUVcc/HPQ02jAYMUOzMdwJBeYOMXwokHVUKk+ 55+KnkDAqSl0LSzjRBceWKtemYMyr9YMrL/MTrq8A229DP22QLQNbJwbPEF/VUZt2+zw07bfqxh35 +IfNZOix1kL+dGLGRkYExAAEGzfTMeUh22cXxiBNKX6As980cD9jUgOuDLXE69hZiqrWiECRXuH7R stJybOisSy+uhhy2v1D1audZb2DDYwGuL+nmZ4KicxnGMGlZ3320nRTQDpiaRwub+KwrDYCh+zz2Q Pb1UKbQ2zsrp1EgpP59h/VSY9W77g==; Message-Id: In-Reply-To: References: From: Christian Schoenebeck Date: Wed, 9 Mar 2022 14:24:24 +0100 Subject: [PATCH 2/6] 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=f19d6f5fd2b569ebac797f18849710eb22c40984@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, 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=no 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: 1646853505646100001 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