[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 09/17] tests/9pfs: Turn fs_mkdir() into a helper
From: |
Christian Schoenebeck |
Subject: |
[PULL v3 09/17] tests/9pfs: Turn fs_mkdir() into a helper |
Date: |
Tue, 20 Oct 2020 18:09:41 +0200 |
From: Greg Kurz <groug@kaod.org>
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 <groug@kaod.org>
Message-Id: <160321018148.266767.15959608711038504029.stgit@bahia.lan>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
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 734b4bcb7a..6f8c46a645 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,
QGuestAllocator *t_alloc)
g_free(wnames[0]);
}
-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 = obj;
- alloc = t_alloc;
char **wnames;
char *const name = g_strdup(cname);
P9Req *req;
@@ -1031,7 +1028,7 @@ static void fs_create_dir(void *obj, void *data,
QGuestAllocator *t_alloc)
g_assert(root_path != NULL);
do_attach(v9p);
- fs_mkdir(v9p, data, t_alloc, "/", "01");
+ do_mkdir(v9p, "/", "01");
/* check if created directory really exists now ... */
g_assert(stat(new_dir, &st) == 0);
--
2.20.1
- [PULL v3 00/17] 9p queue (previous 2020-10-30), Christian Schoenebeck, 2020/11/02
- [PULL v3 01/17] tests/9pfs: make create/remove test dir public, Christian Schoenebeck, 2020/11/02
- [PULL v3 02/17] tests/9pfs: fix test dir for parallel tests, Christian Schoenebeck, 2020/11/02
- [PULL v3 03/17] tests/9pfs: fix coverity error in create_local_test_dir(), Christian Schoenebeck, 2020/11/02
- [PULL v3 04/17] tests/9pfs: Force removing of local 9pfs test directory, Christian Schoenebeck, 2020/11/02
- [PULL v3 05/17] tests/9pfs: Factor out do_version() helper, Christian Schoenebeck, 2020/11/02
- [PULL v3 06/17] tests/9pfs: Set alloc in fs_create_dir(), Christian Schoenebeck, 2020/11/02
- [PULL v3 07/17] tests/9pfs: Factor out do_attach() helper, Christian Schoenebeck, 2020/11/02
- [PULL v3 08/17] tests/9pfs: Turn fs_readdir_split() into a helper, Christian Schoenebeck, 2020/11/02
- [PULL v3 09/17] tests/9pfs: Turn fs_mkdir() into a helper,
Christian Schoenebeck <=
- [PULL v3 10/17] tests/9pfs: simplify do_mkdir(), Christian Schoenebeck, 2020/11/02
- [PULL v3 11/17] tests/9pfs: add local Tunlinkat directory test, Christian Schoenebeck, 2020/11/02
- [PULL v3 12/17] tests/9pfs: add local Tlcreate test, Christian Schoenebeck, 2020/11/02
- [PULL v3 13/17] tests/9pfs: add local Tunlinkat file test, Christian Schoenebeck, 2020/11/02
- [PULL v3 14/17] tests/9pfs: add local Tsymlink test, Christian Schoenebeck, 2020/11/02
- [PULL v3 15/17] tests/9pfs: add local Tunlinkat symlink test, Christian Schoenebeck, 2020/11/02
- [PULL v3 16/17] tests/9pfs: add local Tlink test, Christian Schoenebeck, 2020/11/02
- [PULL v3 17/17] tests/9pfs: add local Tunlinkat hard link test, Christian Schoenebeck, 2020/11/02
- Re: [PULL v3 00/17] 9p queue (previous 2020-10-30), Peter Maydell, 2020/11/02