From nobody Mon Nov 17 09:50:12 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1603453798; cv=none; d=zohomail.com; s=zohoarc; b=EKF+GAbkClDv74SAs/CPa3/lePlUWaVMva7taWLifg9gN1qHmGyDO8mu1/btZOT3p/CvolYHdW8i3o8cPfTCwCBAiOcbQc5KxF2VpOV5OZEtz2b4aU0OJqduHIByY1mYyJeHmpzbaRTF7jBwE6hHQjkVPBWPnBcOKvg+2h+PsEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603453798; 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=7AF7yU4D9DsJeNoffkV8iyJR/WP8ucSnaeQhnCL0mSU=; b=n9D5ADVb2YF0v/UvsMdSR+oNgyTQe3H3PWy4EeA3GVHL2PI5sezuzG0kdyUsrLVuswdryWxdO/eRliKzKpV6K71AwQCYkD7/qZwOlS7F4bxnlCkbrgj1gU1fEArwRJSPbyb0atn9QPL9IZJBEeQVwCaTcof+DOXwgdeLvqK0tnw= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603453798318550.980585853846; Fri, 23 Oct 2020 04:49:58 -0700 (PDT) Received: from localhost ([::1]:48168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVvZz-0006fC-9X for importer@patchew.org; Fri, 23 Oct 2020 07:49:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <780f9da880e45280ce4e0a1b7c72fce618623a05@lizzy.crudebyte.com>) id 1kVvYD-00049r-9x for qemu-devel@nongnu.org; Fri, 23 Oct 2020 07:48:06 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:44387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <780f9da880e45280ce4e0a1b7c72fce618623a05@lizzy.crudebyte.com>) id 1kVvYC-0004Jf-15 for qemu-devel@nongnu.org; Fri, 23 Oct 2020 07:48:05 -0400 Message-Id: <780f9da880e45280ce4e0a1b7c72fce618623a05.1603452058.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Greg Kurz Date: Tue, 20 Oct 2020 18:09:41 +0200 Subject: [PULL 05/13] tests/9pfs: Turn fs_mkdir() into a helper To: qemu-devel@nongnu.org, Peter Maydell 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=780f9da880e45280ce4e0a1b7c72fce618623a05@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 07:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" fs_mkdir() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz Message-Id: <160321018148.266767.15959608711038504029.stgit@bahia.lan> Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 3c187cdc08..2ea555fa04 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -972,11 +972,8 @@ static void fs_flush_ignored(void *obj, void *data, QG= uestAllocator *t_alloc) g_free(wnames[0]); } =20 -static void fs_mkdir(void *obj, void *data, QGuestAllocator *t_alloc, - const char *path, const char *cname) +static void do_mkdir(QVirtio9P *v9p, const char *path, const char *cname) { - QVirtio9P *v9p =3D obj; - alloc =3D t_alloc; char **wnames; char *const name =3D g_strdup(cname); P9Req *req; @@ -1031,7 +1028,7 @@ static void fs_create_dir(void *obj, void *data, QGue= stAllocator *t_alloc) g_assert(root_path !=3D NULL); =20 do_attach(v9p); - fs_mkdir(v9p, data, t_alloc, "/", "01"); + do_mkdir(v9p, "/", "01"); =20 /* check if created directory really exists now ... */ g_assert(stat(new_dir, &st) =3D=3D 0); --=20 2.20.1