[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 01/17] tests/9pfs: make create/remove test dir public
From: |
Christian Schoenebeck |
Subject: |
[PULL v3 01/17] tests/9pfs: make create/remove test dir public |
Date: |
Sun, 1 Nov 2020 15:25:14 +0100 |
Make functions create_local_test_dir() and remove_local_test_dir()
public. They're going to be used in the next patch.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id:
<ec90703cbc23d6b612b3672f946d7741f4a16080.1604243521.git.qemu_oss@crudebyte.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
tests/qtest/libqos/virtio-9p.c | 10 ++++------
tests/qtest/libqos/virtio-9p.h | 10 ++++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c
index d43647b3b7..2736e9ae2a 100644
--- a/tests/qtest/libqos/virtio-9p.c
+++ b/tests/qtest/libqos/virtio-9p.c
@@ -39,8 +39,7 @@ static void init_local_test_path(void)
g_free(pwd);
}
-/* Creates the directory for the 9pfs 'local' filesystem driver to access. */
-static void create_local_test_dir(void)
+void virtio_9p_create_local_test_dir(void)
{
struct stat st;
@@ -53,8 +52,7 @@ static void create_local_test_dir(void)
g_assert((st.st_mode & S_IFMT) == S_IFDIR);
}
-/* Deletes directory previously created by create_local_test_dir(). */
-static void remove_local_test_dir(void)
+void virtio_9p_remove_local_test_dir(void)
{
g_assert(local_test_path != NULL);
char *cmd = g_strdup_printf("rm -r '%s'\n", local_test_path);
@@ -248,8 +246,8 @@ static void virtio_9p_register_nodes(void)
/* make sure test dir for the 'local' tests exists and is clean */
init_local_test_path();
- remove_local_test_dir();
- create_local_test_dir();
+ virtio_9p_remove_local_test_dir();
+ virtio_9p_create_local_test_dir();
QPCIAddress addr = {
.devfn = QPCI_DEVFN(4, 0),
diff --git a/tests/qtest/libqos/virtio-9p.h b/tests/qtest/libqos/virtio-9p.h
index 19a4d97454..480727120e 100644
--- a/tests/qtest/libqos/virtio-9p.h
+++ b/tests/qtest/libqos/virtio-9p.h
@@ -44,6 +44,16 @@ struct QVirtio9PDevice {
QVirtio9P v9p;
};
+/**
+ * Creates the directory for the 9pfs 'local' filesystem driver to access.
+ */
+void virtio_9p_create_local_test_dir(void);
+
+/**
+ * Deletes directory previously created by virtio_9p_create_local_test_dir().
+ */
+void virtio_9p_remove_local_test_dir(void);
+
/**
* Prepares QEMU command line for 9pfs tests using the 'local' fs driver.
*/
--
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 <=
- [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, 2020/11/02
- [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