[tests][v9p] Add an example test for VirtIO 9p device

Add a simple test to validate basic functionalities of the VirtIO 9p
device driver, `dev/virtio/9p`.

For now the test attaches to the first v9p device and try to read the
file `LICENSE` under the shared folder. Therefore, if you set the shared
folder to the git root of `lk`, it will read the `LICENSE` of the
littlekernel and dump it to the console after running `v9p_tests`.

For example:

```
starting internet servers
starting app shell
entering main console loop
] v9p_tests
0x80013c08: 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 20 |/*. * Copyright
0x80013c18: 28 63 29 20 32 30 30 38 2d 32 30 31 35 20 54 72 |(c) 2008-2015 Tr
0x80013c28: 61 76 69 73 20 47 65 69 73 65 6c 62 72 65 63 68 |avis Geiselbrech
0x80013c38: 74 0a 20 2a 0a 20 2a 20 50 65 72 6d 69 73 73 69 |t. *. * Permissi
0x80013c48: 6f 6e 20 69 73 20 68 65 72 65 62 79 20 67 72 61 |on is hereby gra
...
```

Signed-off-by: Cody Wong <codycswong@google.com>
This commit is contained in:
Cody Wong
2023-12-26 15:14:05 +08:00
committed by Travis Geiselbrecht
parent 2b02c8a046
commit db81f606da
4 changed files with 109 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ MODULE_SRCS := \
$(LOCAL_DIR)/tests.c \
$(LOCAL_DIR)/thread_tests.c \
$(LOCAL_DIR)/port_tests.c \
$(LOCAL_DIR)/v9p_tests.c \
MODULE_FLOAT_SRCS := \
$(LOCAL_DIR)/benchmarks.c \