From nobody Mon Feb 9 12:29:13 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=1664918843; cv=none; d=zohomail.com; s=zohoarc; b=Hz1ckMkSr0rmrn8zKv+FWqHC51lsyWCVacStyV+95KU9ipPxTosiztKXYWmQ3XT/t74sw/dq2NID1l8WqOZ5l5pPmvn5QbZkFOEFDIJpcrNsSzF6t0AxkQwbvYHG/yHNJfr2eFdAft2FmxZiee9ogFpcqjclIWPQUfwifo802WU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664918843; 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=uBPVKXAiglNBxu9yfa09lCFCMWjpdddqcwXn7bHsoPI=; b=iKROZ5fIwI6cnpN/SuuBhKsflA0hmfV5rARKcVWV3VhXcslVahvT4cA0pHwTdz2JbBEycCol7vDZKO5Yy6n7KRL3w7z/Ytkyr9CsqfBPRcBq02yf1eDYQAis7oIJFYEIfj4wfdQnX60Bk9SPFZYaSQDUEJzeUhvsxAq6nUeNGOU= 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 1664918843936549.5401637681806; Tue, 4 Oct 2022 14:27:23 -0700 (PDT) Received: from localhost ([::1]:56072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofpRi-0007Sj-TO for importer@patchew.org; Tue, 04 Oct 2022 17:27:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <9b50e5b89a0072e84a9191d18c19a53546a28bba@lizzy.crudebyte.com>) id 1ofpLG-0006Ib-CF for qemu-devel@nongnu.org; Tue, 04 Oct 2022 17:20:57 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:43139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <9b50e5b89a0072e84a9191d18c19a53546a28bba@lizzy.crudebyte.com>) id 1ofpLD-0002Ja-SB for qemu-devel@nongnu.org; Tue, 04 Oct 2022 17:20:41 -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=uBPVKXAiglNBxu9yfa09lCFCMWjpdddqcwXn7bHsoPI=; b=IpHha o+W39RZ0nvocUadFW/maVCf+j8NdBM3A9HNnexBwNJerhdjvUlAe1l9EmINGrTiD2P6QfjYxT7DzG LTGLku+8X0/KMi9mXs5qxZlrxsHnEey6zypBlRPkpE2VYm/Eh2I4qjuE1qdeBmuiRvnJbs83tyCrg YqZkB/uOab/YIaLVo2Y0xZEOm0z+9PZGi1aXX+E8EqCDGfn7xcC0wcNiHf7APHLFu0N/o4GQJBTIV J9lgHGcHSbmTIcIKGTYFFoOKmFOsgrDMRszyDwruI+TDCDO1ye1qoJJTYKWOSLJ5KpIuLgksrXZ1O XwXXtyupCF3wOc2j3AIIWvgsubRbQ==; Message-Id: <9b50e5b89a0072e84a9191d18c19a53546a28bba.1664917004.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Tue, 4 Oct 2022 22:53:38 +0200 Subject: [PATCH 05/20] tests/9p: simplify callers of tattach() 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=9b50e5b89a0072e84a9191d18c19a53546a28bba@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 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: 1664918845723100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now as tattach() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 271c42f6f9..46bb189b81 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -302,11 +302,10 @@ static void fs_walk_none(void *obj, void *data, QGues= tAllocator *t_alloc) struct v9fs_attr attr; =20 tversion({ .client =3D v9p }); - req =3D tattach({ - .client =3D v9p, .fid =3D 0, .n_uname =3D getuid(), .requestOnly = =3D true - }).req; - v9fs_req_wait_for_reply(req, NULL); - v9fs_rattach(req, &root_qid); + tattach({ + .client =3D v9p, .fid =3D 0, .n_uname =3D getuid(), + .rattach.qid =3D &root_qid + }); =20 twalk({ .client =3D v9p, .fid =3D 0, .newfid =3D 1, .nwname =3D 0, .wnames= =3D NULL, @@ -330,14 +329,12 @@ static void fs_walk_dotdot(void *obj, void *data, QGu= estAllocator *t_alloc) char *wnames[] =3D { g_strdup("..") }; v9fs_qid root_qid; g_autofree v9fs_qid *wqid =3D NULL; - P9Req *req; =20 tversion({ .client =3D v9p }); - req =3D tattach((TAttachOpt) { - .client =3D v9p, .fid =3D 0, .n_uname =3D getuid(), .requestOnly = =3D true - }).req; - v9fs_req_wait_for_reply(req, NULL); - v9fs_rattach(req, &root_qid); + tattach({ + .client =3D v9p, .fid =3D 0, .n_uname =3D getuid(), + .rattach.qid =3D &root_qid + }); =20 twalk({ .client =3D v9p, .fid =3D 0, .newfid =3D 1, .nwname =3D 1, .wnames= =3D wnames, --=20 2.30.2