[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/19] tests/qtest: virtio-9p-test: Adapt the case for win32
From: |
Bin Meng |
Subject: |
[PATCH v2 18/19] tests/qtest: virtio-9p-test: Adapt the case for win32 |
Date: |
Fri, 11 Nov 2022 12:22:24 +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>
---
Changes in v2:
- Move getuid() to virtio-9p-client.h
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 v2 08/19] hw/9pfs: Update the local fs driver to support Windows, (continued)
- [PATCH v2 08/19] hw/9pfs: Update the local fs driver to support Windows, Bin Meng, 2022/11/10
- [PATCH v2 07/19] hw/9pfs: Implement Windows specific utilities functions for 9pfs, Bin Meng, 2022/11/10
- [PATCH v2 01/19] qemu/xattr.h: Exclude <sys/xattr.h> for Windows, Bin Meng, 2022/11/10
- [PATCH v2 10/19] hw/9pfs: Add a helper qemu_stat_rdev(), Bin Meng, 2022/11/10
- [PATCH v2 09/19] hw/9pfs: Support getting current directory offset for Windows, Bin Meng, 2022/11/10
- [PATCH v2 11/19] hw/9pfs: Add a helper qemu_stat_blksize(), Bin Meng, 2022/11/10
- [PATCH v2 13/19] hw/9pfs: Update v9fs_set_fd_limit() for Windows, Bin Meng, 2022/11/10
- [PATCH v2 12/19] hw/9pfs: Disable unsupported flags and features for Windows, Bin Meng, 2022/11/10
- [PATCH v2 18/19] tests/qtest: virtio-9p-test: Adapt the case for win32,
Bin Meng <=
- [PATCH v2 14/19] hw/9pfs: Add Linux error number definition, Bin Meng, 2022/11/10
- [PATCH v2 15/19] hw/9pfs: Translate Windows errno to Linux value, Bin Meng, 2022/11/10
- [PATCH v2 17/19] hw/9pfs: Update synth fs driver for Windows, Bin Meng, 2022/11/10
- [PATCH v2 16/19] fsdev: Disable proxy fs driver on Windows, Bin Meng, 2022/11/10
- [PATCH v2 19/19] meson.build: Turn on virtfs for Windows, Bin Meng, 2022/11/10