[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/17] tests/qtest: virtio-9p-test: Adapt the case for win32
From: |
Bin Meng |
Subject: |
[PATCH v3 16/17] tests/qtest: virtio-9p-test: Adapt the case for win32 |
Date: |
Mon, 19 Dec 2022 18:20:20 +0800 |
From: Guohuai Shi <guohuai.shi@windriver.com>
Windows does not provide the getuid() API. Let's create a local
one and return a fixed value 0 as the uid for testing.
Co-developed-by: Xuzhou Cheng <xuzhou.cheng@windriver.com>
Signed-off-by: Guohuai Shi <guohuai.shi@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
(no changes since v1)
tests/qtest/libqos/virtio-9p-client.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/qtest/libqos/virtio-9p-client.h
b/tests/qtest/libqos/virtio-9p-client.h
index 78228eb97d..a5c0107580 100644
--- a/tests/qtest/libqos/virtio-9p-client.h
+++ b/tests/qtest/libqos/virtio-9p-client.h
@@ -491,4 +491,11 @@ void v9fs_rlink(P9Req *req);
TunlinkatRes v9fs_tunlinkat(TunlinkatOpt);
void v9fs_runlinkat(P9Req *req);
+#ifdef CONFIG_WIN32
+static inline uint32_t getuid(void)
+{
+ return 0;
+}
+#endif
+
#endif
--
2.25.1
- [PATCH v3 00/17] hw/9pfs: Add 9pfs support for Windows, Bin Meng, 2022/12/19
- [PATCH v3 02/17] hw/9pfs: Drop unnecessary *xattr wrapper API declarations, Bin Meng, 2022/12/19
- [PATCH v3 08/17] hw/9pfs: update helper qemu_stat_rdev(), Bin Meng, 2022/12/19
- [PATCH v3 16/17] tests/qtest: virtio-9p-test: Adapt the case for win32,
Bin Meng <=
- [PATCH v3 15/17] hw/9pfs: Update synth fs driver for Windows, Bin Meng, 2022/12/19
- [PATCH v3 05/17] hw/9pfs: Implement Windows specific utilities functions for 9pfs, Bin Meng, 2022/12/19
- [PATCH v3 04/17] hw/9pfs: Add missing definitions for Windows, Bin Meng, 2022/12/19
- [PATCH v3 07/17] hw/9pfs: Support getting current directory offset for Windows, Bin Meng, 2022/12/19
- Re: [PATCH v3 07/17] hw/9pfs: Support getting current directory offset for Windows, Christian Schoenebeck, 2022/12/21
- RE: [PATCH v3 07/17] hw/9pfs: Support getting current directory offset for Windows, Shi, Guohuai, 2022/12/21
- Re: [PATCH v3 07/17] hw/9pfs: Support getting current directory offset for Windows, Christian Schoenebeck, 2022/12/28
- RE: [PATCH v3 07/17] hw/9pfs: Support getting current directory offset for Windows, Shi, Guohuai, 2022/12/29
- Re: [PATCH v3 07/17] hw/9pfs: Support getting current directory offset for Windows, Christian Schoenebeck, 2022/12/30
[PATCH v3 06/17] hw/9pfs: Update the local fs driver to support Windows, Bin Meng, 2022/12/19