[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/16] tests/qtest: virtio-9p-test: Adapt the case for win32
From: |
Bin Meng |
Subject: |
[PATCH 15/16] tests/qtest: virtio-9p-test: Adapt the case for win32 |
Date: |
Mon, 24 Oct 2022 12:57:58 +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.
Signed-off-by: Guohuai Shi <guohuai.shi@windriver.com>
Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
tests/qtest/virtio-9p-test.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c
index 25305a4cf7..e81e3e3709 100644
--- a/tests/qtest/virtio-9p-test.c
+++ b/tests/qtest/virtio-9p-test.c
@@ -34,6 +34,13 @@ static uint32_t genfid(void)
return fid_generator++;
}
+#ifdef CONFIG_WIN32
+static uint32_t getuid(void)
+{
+ return 0;
+}
+#endif
+
/**
* Splits the @a in string by @a delim into individual (non empty) strings
* and outputs them to @a out. The output array @a out is NULL terminated.
--
2.25.1
- [PATCH 05/16] hw/9pfs: Update P9_FILE_ID to support Windows, (continued)
- [PATCH 05/16] hw/9pfs: Update P9_FILE_ID to support Windows, Bin Meng, 2022/10/24
- [PATCH 06/16] hw/9pfs: Add missing definitions for Windows, Bin Meng, 2022/10/24
- [PATCH 12/16] hw/9pfs: Translate Windows errno to Linux value, Bin Meng, 2022/10/24
- [PATCH 07/16] hw/9pfs: Implement Windows specific utilities functions for 9pfs, Bin Meng, 2022/10/24
- [PATCH 10/16] hw/9pfs: Update the local fs driver to support Windows, Bin Meng, 2022/10/24
- [PATCH 04/16] hw/9pfs: Introduce an opaque type 9P_FILE_ID, Bin Meng, 2022/10/24
- [PATCH 08/16] hw/9pfs: Handle current directory offset for Windows, Bin Meng, 2022/10/24
- [PATCH 09/16] hw/9pfs: Disable unsupported flags and features for Windows, Bin Meng, 2022/10/24
- [PATCH 11/16] hw/9pfs: Add Linux error number definition, Bin Meng, 2022/10/24
- [PATCH 13/16] fsdev: Disable proxy fs driver on Windows, Bin Meng, 2022/10/24
- [PATCH 15/16] tests/qtest: virtio-9p-test: Adapt the case for win32,
Bin Meng <=
- [PATCH 14/16] hw/9pfs: Update synth fs driver for Windows, Bin Meng, 2022/10/24
- [PATCH 16/16] meson.build: Turn on virtfs for Windows, Bin Meng, 2022/10/24
- Re: [PATCH 00/16] hw/9pfs: Add 9pfs support for Windows, Bin Meng, 2022/10/27