From nobody Mon Feb 9 20:12:10 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=1666613723; cv=none; d=zohomail.com; s=zohoarc; b=ZgCwPbttrAPZluMHLhW2b9pbU3qe25Y9/yDvw/aUJ+9lEtQwvbgUAfMN1wWNmSql80QEPze8i1oUKldf51Mx0sFM+I/I3qfS4+cslvhq9WGbynOUoqKPvRLu24SUu5XUY/euZO6ODsRh3+VzdTzBc2jg4j7Ie+whFGU6XOVH8rU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666613723; 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=0kFzIHpJ65NpGxpwkyahaB5OiazqJwfq8ejhmsUIJe4=; b=GomieimOiHrHIj0dyF0o0x97akiV+25qsA0v/Uno1vOFXjTrunWV/cmtD7Kf3kX2gqwjoo962LHjbM2V4sC0nUmIVCpX/upKkAFauSB5J2/Yb/kmeEe/s+TbDM6BSEfYDAvpQK55+sXDHDEMvFk+qfwvrVvn9Rz+6jrgt8+Da8s= 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 1666613723747481.5546367359524; Mon, 24 Oct 2022 05:15:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omvN5-0000wk-DO; Mon, 24 Oct 2022 07:11:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omvMu-0000o3-UO for qemu-devel@nongnu.org; Mon, 24 Oct 2022 07:11:46 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omvMr-0007PP-SL for qemu-devel@nongnu.org; Mon, 24 Oct 2022 07:11:44 -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=0kFzIHpJ65NpGxpwkyahaB5OiazqJwfq8ejhmsUIJe4=; b=A+adG DB48W6uGp2VDH4x7XeNvWmFjBj7HECbrmhi+U56tbvZgxYLBhIqBcLueDQ0e9ie0FHNdCcoy/2pOt 6PQLQZrtmeh1bXASOD8GmD6bW3J/e5uEG3SmusDArPitO+ikwGyzUpwLgnnxTQeFd9GAw4EyQiCtn ZRYxz6p7DSF41jaTzEx+YBZxfkx4aKsNFytcmc0aa5gP0J7JTkJ6vZuHtH0Ft6GuH0Ij6rqqP0UHX Ng+dNaIhLKabS1vdfJA9kG2XMrk5EUqKywzQiYnrKubQs074HV52PFERjoSy9OWhrakuCb6dAY9Qk Mzn/FT6SgIvuprqsDrHcbgMJux2NQ==; Message-Id: In-Reply-To: References: From: Christian Schoenebeck Date: Mon, 24 Oct 2022 12:54:23 +0200 Subject: [PULL 16/23] tests/9p: simplify callers of twrite() To: qemu-devel@nongnu.org, Stefan Hajnoczi 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=bb286ff8e85dcc222c93c9f3a164034561d1f585@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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @crudebyte.com) X-ZM-MESSAGEID: 1666613725655100003 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now as twrite() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck Message-Id: <7f280ec6a1f9d8afed46567a796562c4dc28afa9.1664917004.git.qemu_o= ss@crudebyte.com> --- tests/qtest/virtio-9p-test.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index a5b9284acb..5ad7bebec7 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -377,7 +377,6 @@ static void fs_write(void *obj, void *data, QGuestAlloc= ator *t_alloc) char *wnames[] =3D { g_strdup(QTEST_V9FS_SYNTH_WRITE_FILE) }; g_autofree char *buf =3D g_malloc0(write_count); uint32_t count; - P9Req *req; =20 tattach({ .client =3D v9p }); twalk({ @@ -386,12 +385,10 @@ static void fs_write(void *obj, void *data, QGuestAll= ocator *t_alloc) =20 tlopen({ .client =3D v9p, .fid =3D 1, .flags =3D O_WRONLY }); =20 - req =3D twrite({ + count =3D twrite({ .client =3D v9p, .fid =3D 1, .offset =3D 0, .count =3D write_count, - .data =3D buf, .requestOnly =3D true - }).req; - v9fs_req_wait_for_reply(req, NULL); - v9fs_rwrite(req, &count); + .data =3D buf + }).count; g_assert_cmpint(count, =3D=3D, write_count); =20 g_free(wnames[0]); --=20 2.30.2