target/arm: Expand vector registers for SVE
[qemu/ar7.git] / tests / virtio-9p-test.c
blob54edcb995542c64c40c3a433c8256f67e5588128
1 /*
2 * QTest testcase for VirtIO 9P
4 * Copyright (c) 2014 SUSE LINUX Products GmbH
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
10 #include "qemu/osdep.h"
11 #include "libqtest.h"
12 #include "qemu-common.h"
13 #include "libqos/libqos-pc.h"
14 #include "libqos/libqos-spapr.h"
15 #include "libqos/virtio.h"
16 #include "libqos/virtio-pci.h"
17 #include "standard-headers/linux/virtio_ids.h"
18 #include "standard-headers/linux/virtio_pci.h"
19 #include "hw/9pfs/9p.h"
20 #include "hw/9pfs/9p-synth.h"
22 #define QVIRTIO_9P_TIMEOUT_US (10 * 1000 * 1000)
24 static const char mount_tag[] = "qtest";
26 typedef struct {
27 QVirtioDevice *dev;
28 QOSState *qs;
29 QVirtQueue *vq;
30 } QVirtIO9P;
32 static QVirtIO9P *qvirtio_9p_start(const char *driver)
34 const char *arch = qtest_get_arch();
35 const char *cmd = "-fsdev synth,id=fsdev0 "
36 "-device %s,fsdev=fsdev0,mount_tag=%s";
37 QVirtIO9P *v9p = g_new0(QVirtIO9P, 1);
39 if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
40 v9p->qs = qtest_pc_boot(cmd, driver, mount_tag);
41 } else if (strcmp(arch, "ppc64") == 0) {
42 v9p->qs = qtest_spapr_boot(cmd, driver, mount_tag);
43 } else {
44 g_printerr("virtio-9p tests are only available on x86 or ppc64\n");
45 exit(EXIT_FAILURE);
48 return v9p;
51 static void qvirtio_9p_stop(QVirtIO9P *v9p)
53 qtest_shutdown(v9p->qs);
54 g_free(v9p);
57 static QVirtIO9P *qvirtio_9p_pci_start(void)
59 QVirtIO9P *v9p = qvirtio_9p_start("virtio-9p-pci");
60 QVirtioPCIDevice *dev = qvirtio_pci_device_find(v9p->qs->pcibus,
61 VIRTIO_ID_9P);
62 g_assert_nonnull(dev);
63 g_assert_cmphex(dev->vdev.device_type, ==, VIRTIO_ID_9P);
64 v9p->dev = (QVirtioDevice *) dev;
66 qvirtio_pci_device_enable(dev);
67 qvirtio_reset(v9p->dev);
68 qvirtio_set_acknowledge(v9p->dev);
69 qvirtio_set_driver(v9p->dev);
71 v9p->vq = qvirtqueue_setup(v9p->dev, v9p->qs->alloc, 0);
73 qvirtio_set_driver_ok(v9p->dev);
75 return v9p;
78 static void qvirtio_9p_pci_stop(QVirtIO9P *v9p)
80 qvirtqueue_cleanup(v9p->dev->bus, v9p->vq, v9p->qs->alloc);
81 qvirtio_pci_device_disable(container_of(v9p->dev, QVirtioPCIDevice, vdev));
82 qvirtio_pci_device_free((QVirtioPCIDevice *)v9p->dev);
83 qvirtio_9p_stop(v9p);
86 static void pci_config(QVirtIO9P *v9p)
88 size_t tag_len = qvirtio_config_readw(v9p->dev, 0);
89 char *tag;
90 int i;
92 g_assert_cmpint(tag_len, ==, strlen(mount_tag));
94 tag = g_malloc(tag_len);
95 for (i = 0; i < tag_len; i++) {
96 tag[i] = qvirtio_config_readb(v9p->dev, i + 2);
98 g_assert_cmpmem(tag, tag_len, mount_tag, tag_len);
99 g_free(tag);
102 #define P9_MAX_SIZE 4096 /* Max size of a T-message or R-message */
104 typedef struct {
105 QVirtIO9P *v9p;
106 uint16_t tag;
107 uint64_t t_msg;
108 uint32_t t_size;
109 uint64_t r_msg;
110 /* No r_size, it is hardcoded to P9_MAX_SIZE */
111 size_t t_off;
112 size_t r_off;
113 uint32_t free_head;
114 } P9Req;
116 static void v9fs_memwrite(P9Req *req, const void *addr, size_t len)
118 memwrite(req->t_msg + req->t_off, addr, len);
119 req->t_off += len;
122 static void v9fs_memskip(P9Req *req, size_t len)
124 req->r_off += len;
127 static void v9fs_memread(P9Req *req, void *addr, size_t len)
129 memread(req->r_msg + req->r_off, addr, len);
130 req->r_off += len;
133 static void v9fs_uint16_write(P9Req *req, uint16_t val)
135 uint16_t le_val = cpu_to_le16(val);
137 v9fs_memwrite(req, &le_val, 2);
140 static void v9fs_uint16_read(P9Req *req, uint16_t *val)
142 v9fs_memread(req, val, 2);
143 le16_to_cpus(val);
146 static void v9fs_uint32_write(P9Req *req, uint32_t val)
148 uint32_t le_val = cpu_to_le32(val);
150 v9fs_memwrite(req, &le_val, 4);
153 static void v9fs_uint64_write(P9Req *req, uint64_t val)
155 uint64_t le_val = cpu_to_le64(val);
157 v9fs_memwrite(req, &le_val, 8);
160 static void v9fs_uint32_read(P9Req *req, uint32_t *val)
162 v9fs_memread(req, val, 4);
163 le32_to_cpus(val);
166 /* len[2] string[len] */
167 static uint16_t v9fs_string_size(const char *string)
169 size_t len = strlen(string);
171 g_assert_cmpint(len, <=, UINT16_MAX - 2);
173 return 2 + len;
176 static void v9fs_string_write(P9Req *req, const char *string)
178 int len = strlen(string);
180 g_assert_cmpint(len, <=, UINT16_MAX);
182 v9fs_uint16_write(req, (uint16_t) len);
183 v9fs_memwrite(req, string, len);
186 static void v9fs_string_read(P9Req *req, uint16_t *len, char **string)
188 uint16_t local_len;
190 v9fs_uint16_read(req, &local_len);
191 if (len) {
192 *len = local_len;
194 if (string) {
195 *string = g_malloc(local_len);
196 v9fs_memread(req, *string, local_len);
197 } else {
198 v9fs_memskip(req, local_len);
202 typedef struct {
203 uint32_t size;
204 uint8_t id;
205 uint16_t tag;
206 } QEMU_PACKED P9Hdr;
208 static P9Req *v9fs_req_init(QVirtIO9P *v9p, uint32_t size, uint8_t id,
209 uint16_t tag)
211 P9Req *req = g_new0(P9Req, 1);
212 uint32_t total_size = 7; /* 9P header has well-known size of 7 bytes */
213 P9Hdr hdr = {
214 .id = id,
215 .tag = cpu_to_le16(tag)
218 g_assert_cmpint(total_size, <=, UINT32_MAX - size);
219 total_size += size;
220 hdr.size = cpu_to_le32(total_size);
222 g_assert_cmpint(total_size, <=, P9_MAX_SIZE);
224 req->v9p = v9p;
225 req->t_size = total_size;
226 req->t_msg = guest_alloc(v9p->qs->alloc, req->t_size);
227 v9fs_memwrite(req, &hdr, 7);
228 req->tag = tag;
229 return req;
232 static void v9fs_req_send(P9Req *req)
234 QVirtIO9P *v9p = req->v9p;
236 req->r_msg = guest_alloc(v9p->qs->alloc, P9_MAX_SIZE);
237 req->free_head = qvirtqueue_add(v9p->vq, req->t_msg, req->t_size, false,
238 true);
239 qvirtqueue_add(v9p->vq, req->r_msg, P9_MAX_SIZE, true, false);
240 qvirtqueue_kick(v9p->dev, v9p->vq, req->free_head);
241 req->t_off = 0;
244 static const char *rmessage_name(uint8_t id)
246 return
247 id == P9_RLERROR ? "RLERROR" :
248 id == P9_RVERSION ? "RVERSION" :
249 id == P9_RATTACH ? "RATTACH" :
250 id == P9_RWALK ? "RWALK" :
251 id == P9_RLOPEN ? "RLOPEN" :
252 id == P9_RWRITE ? "RWRITE" :
253 id == P9_RFLUSH ? "RFLUSH" :
254 "<unknown>";
257 static void v9fs_req_wait_for_reply(P9Req *req, uint32_t *len)
259 QVirtIO9P *v9p = req->v9p;
261 qvirtio_wait_used_elem(v9p->dev, v9p->vq, req->free_head, len,
262 QVIRTIO_9P_TIMEOUT_US);
265 static void v9fs_req_recv(P9Req *req, uint8_t id)
267 P9Hdr hdr;
269 v9fs_memread(req, &hdr, 7);
270 hdr.size = ldl_le_p(&hdr.size);
271 hdr.tag = lduw_le_p(&hdr.tag);
273 g_assert_cmpint(hdr.size, >=, 7);
274 g_assert_cmpint(hdr.size, <=, P9_MAX_SIZE);
275 g_assert_cmpint(hdr.tag, ==, req->tag);
277 if (hdr.id != id) {
278 g_printerr("Received response %d (%s) instead of %d (%s)\n",
279 hdr.id, rmessage_name(hdr.id), id, rmessage_name(id));
281 if (hdr.id == P9_RLERROR) {
282 uint32_t err;
283 v9fs_uint32_read(req, &err);
284 g_printerr("Rlerror has errno %d (%s)\n", err, strerror(err));
287 g_assert_cmpint(hdr.id, ==, id);
290 static void v9fs_req_free(P9Req *req)
292 QVirtIO9P *v9p = req->v9p;
294 guest_free(v9p->qs->alloc, req->t_msg);
295 guest_free(v9p->qs->alloc, req->r_msg);
296 g_free(req);
299 /* size[4] Rlerror tag[2] ecode[4] */
300 static void v9fs_rlerror(P9Req *req, uint32_t *err)
302 v9fs_req_recv(req, P9_RLERROR);
303 v9fs_uint32_read(req, err);
304 v9fs_req_free(req);
307 /* size[4] Tversion tag[2] msize[4] version[s] */
308 static P9Req *v9fs_tversion(QVirtIO9P *v9p, uint32_t msize, const char *version,
309 uint16_t tag)
311 P9Req *req;
312 uint32_t body_size = 4;
313 uint16_t string_size = v9fs_string_size(version);
315 g_assert_cmpint(body_size, <=, UINT32_MAX - string_size);
316 body_size += string_size;
317 req = v9fs_req_init(v9p, body_size, P9_TVERSION, tag);
319 v9fs_uint32_write(req, msize);
320 v9fs_string_write(req, version);
321 v9fs_req_send(req);
322 return req;
325 /* size[4] Rversion tag[2] msize[4] version[s] */
326 static void v9fs_rversion(P9Req *req, uint16_t *len, char **version)
328 uint32_t msize;
330 v9fs_req_recv(req, P9_RVERSION);
331 v9fs_uint32_read(req, &msize);
333 g_assert_cmpint(msize, ==, P9_MAX_SIZE);
335 if (len || version) {
336 v9fs_string_read(req, len, version);
339 v9fs_req_free(req);
342 /* size[4] Tattach tag[2] fid[4] afid[4] uname[s] aname[s] n_uname[4] */
343 static P9Req *v9fs_tattach(QVirtIO9P *v9p, uint32_t fid, uint32_t n_uname,
344 uint16_t tag)
346 const char *uname = ""; /* ignored by QEMU */
347 const char *aname = ""; /* ignored by QEMU */
348 P9Req *req = v9fs_req_init(v9p, 4 + 4 + 2 + 2 + 4, P9_TATTACH, tag);
350 v9fs_uint32_write(req, fid);
351 v9fs_uint32_write(req, P9_NOFID);
352 v9fs_string_write(req, uname);
353 v9fs_string_write(req, aname);
354 v9fs_uint32_write(req, n_uname);
355 v9fs_req_send(req);
356 return req;
359 typedef char v9fs_qid[13];
361 /* size[4] Rattach tag[2] qid[13] */
362 static void v9fs_rattach(P9Req *req, v9fs_qid *qid)
364 v9fs_req_recv(req, P9_RATTACH);
365 if (qid) {
366 v9fs_memread(req, qid, 13);
368 v9fs_req_free(req);
371 /* size[4] Twalk tag[2] fid[4] newfid[4] nwname[2] nwname*(wname[s]) */
372 static P9Req *v9fs_twalk(QVirtIO9P *v9p, uint32_t fid, uint32_t newfid,
373 uint16_t nwname, char *const wnames[], uint16_t tag)
375 P9Req *req;
376 int i;
377 uint32_t body_size = 4 + 4 + 2;
379 for (i = 0; i < nwname; i++) {
380 uint16_t wname_size = v9fs_string_size(wnames[i]);
382 g_assert_cmpint(body_size, <=, UINT32_MAX - wname_size);
383 body_size += wname_size;
385 req = v9fs_req_init(v9p, body_size, P9_TWALK, tag);
386 v9fs_uint32_write(req, fid);
387 v9fs_uint32_write(req, newfid);
388 v9fs_uint16_write(req, nwname);
389 for (i = 0; i < nwname; i++) {
390 v9fs_string_write(req, wnames[i]);
392 v9fs_req_send(req);
393 return req;
396 /* size[4] Rwalk tag[2] nwqid[2] nwqid*(wqid[13]) */
397 static void v9fs_rwalk(P9Req *req, uint16_t *nwqid, v9fs_qid **wqid)
399 uint16_t local_nwqid;
401 v9fs_req_recv(req, P9_RWALK);
402 v9fs_uint16_read(req, &local_nwqid);
403 if (nwqid) {
404 *nwqid = local_nwqid;
406 if (wqid) {
407 *wqid = g_malloc(local_nwqid * 13);
408 v9fs_memread(req, *wqid, local_nwqid * 13);
410 v9fs_req_free(req);
413 /* size[4] Tlopen tag[2] fid[4] flags[4] */
414 static P9Req *v9fs_tlopen(QVirtIO9P *v9p, uint32_t fid, uint32_t flags,
415 uint16_t tag)
417 P9Req *req;
419 req = v9fs_req_init(v9p, 4 + 4, P9_TLOPEN, tag);
420 v9fs_uint32_write(req, fid);
421 v9fs_uint32_write(req, flags);
422 v9fs_req_send(req);
423 return req;
426 /* size[4] Rlopen tag[2] qid[13] iounit[4] */
427 static void v9fs_rlopen(P9Req *req, v9fs_qid *qid, uint32_t *iounit)
429 v9fs_req_recv(req, P9_RLOPEN);
430 if (qid) {
431 v9fs_memread(req, qid, 13);
432 } else {
433 v9fs_memskip(req, 13);
435 if (iounit) {
436 v9fs_uint32_read(req, iounit);
438 v9fs_req_free(req);
441 /* size[4] Twrite tag[2] fid[4] offset[8] count[4] data[count] */
442 static P9Req *v9fs_twrite(QVirtIO9P *v9p, uint32_t fid, uint64_t offset,
443 uint32_t count, const void *data, uint16_t tag)
445 P9Req *req;
446 uint32_t body_size = 4 + 8 + 4;
448 g_assert_cmpint(body_size, <=, UINT32_MAX - count);
449 body_size += count;
450 req = v9fs_req_init(v9p, body_size, P9_TWRITE, tag);
451 v9fs_uint32_write(req, fid);
452 v9fs_uint64_write(req, offset);
453 v9fs_uint32_write(req, count);
454 v9fs_memwrite(req, data, count);
455 v9fs_req_send(req);
456 return req;
459 /* size[4] Rwrite tag[2] count[4] */
460 static void v9fs_rwrite(P9Req *req, uint32_t *count)
462 v9fs_req_recv(req, P9_RWRITE);
463 if (count) {
464 v9fs_uint32_read(req, count);
466 v9fs_req_free(req);
469 /* size[4] Tflush tag[2] oldtag[2] */
470 static P9Req *v9fs_tflush(QVirtIO9P *v9p, uint16_t oldtag, uint16_t tag)
472 P9Req *req;
474 req = v9fs_req_init(v9p, 2, P9_TFLUSH, tag);
475 v9fs_uint32_write(req, oldtag);
476 v9fs_req_send(req);
477 return req;
480 /* size[4] Rflush tag[2] */
481 static void v9fs_rflush(P9Req *req)
483 v9fs_req_recv(req, P9_RFLUSH);
484 v9fs_req_free(req);
487 static void fs_version(QVirtIO9P *v9p)
489 const char *version = "9P2000.L";
490 uint16_t server_len;
491 char *server_version;
492 P9Req *req;
494 req = v9fs_tversion(v9p, P9_MAX_SIZE, version, P9_NOTAG);
495 v9fs_req_wait_for_reply(req, NULL);
496 v9fs_rversion(req, &server_len, &server_version);
498 g_assert_cmpmem(server_version, server_len, version, strlen(version));
500 g_free(server_version);
503 static void fs_attach(QVirtIO9P *v9p)
505 P9Req *req;
507 fs_version(v9p);
508 req = v9fs_tattach(v9p, 0, getuid(), 0);
509 v9fs_req_wait_for_reply(req, NULL);
510 v9fs_rattach(req, NULL);
513 static void fs_walk(QVirtIO9P *v9p)
515 char *wnames[P9_MAXWELEM];
516 uint16_t nwqid;
517 v9fs_qid *wqid;
518 int i;
519 P9Req *req;
521 for (i = 0; i < P9_MAXWELEM; i++) {
522 wnames[i] = g_strdup_printf(QTEST_V9FS_SYNTH_WALK_FILE, i);
525 fs_attach(v9p);
526 req = v9fs_twalk(v9p, 0, 1, P9_MAXWELEM, wnames, 0);
527 v9fs_req_wait_for_reply(req, NULL);
528 v9fs_rwalk(req, &nwqid, &wqid);
530 g_assert_cmpint(nwqid, ==, P9_MAXWELEM);
532 for (i = 0; i < P9_MAXWELEM; i++) {
533 g_free(wnames[i]);
536 g_free(wqid);
539 static void fs_walk_no_slash(QVirtIO9P *v9p)
541 char *const wnames[] = { g_strdup(" /") };
542 P9Req *req;
543 uint32_t err;
545 fs_attach(v9p);
546 req = v9fs_twalk(v9p, 0, 1, 1, wnames, 0);
547 v9fs_req_wait_for_reply(req, NULL);
548 v9fs_rlerror(req, &err);
550 g_assert_cmpint(err, ==, ENOENT);
552 g_free(wnames[0]);
555 static void fs_walk_dotdot(QVirtIO9P *v9p)
557 char *const wnames[] = { g_strdup("..") };
558 v9fs_qid root_qid, *wqid;
559 P9Req *req;
561 fs_version(v9p);
562 req = v9fs_tattach(v9p, 0, getuid(), 0);
563 v9fs_req_wait_for_reply(req, NULL);
564 v9fs_rattach(req, &root_qid);
566 req = v9fs_twalk(v9p, 0, 1, 1, wnames, 0);
567 v9fs_req_wait_for_reply(req, NULL);
568 v9fs_rwalk(req, NULL, &wqid); /* We now we'll get one qid */
570 g_assert_cmpmem(&root_qid, 13, wqid[0], 13);
572 g_free(wqid);
573 g_free(wnames[0]);
576 static void fs_lopen(QVirtIO9P *v9p)
578 char *const wnames[] = { g_strdup(QTEST_V9FS_SYNTH_LOPEN_FILE) };
579 P9Req *req;
581 fs_attach(v9p);
582 req = v9fs_twalk(v9p, 0, 1, 1, wnames, 0);
583 v9fs_req_wait_for_reply(req, NULL);
584 v9fs_rwalk(req, NULL, NULL);
586 req = v9fs_tlopen(v9p, 1, O_WRONLY, 0);
587 v9fs_req_wait_for_reply(req, NULL);
588 v9fs_rlopen(req, NULL, NULL);
590 g_free(wnames[0]);
593 static void fs_write(QVirtIO9P *v9p)
595 static const uint32_t write_count = P9_MAX_SIZE / 2;
596 char *const wnames[] = { g_strdup(QTEST_V9FS_SYNTH_WRITE_FILE) };
597 char *buf = g_malloc0(write_count);
598 uint32_t count;
599 P9Req *req;
601 fs_attach(v9p);
602 req = v9fs_twalk(v9p, 0, 1, 1, wnames, 0);
603 v9fs_req_wait_for_reply(req, NULL);
604 v9fs_rwalk(req, NULL, NULL);
606 req = v9fs_tlopen(v9p, 1, O_WRONLY, 0);
607 v9fs_req_wait_for_reply(req, NULL);
608 v9fs_rlopen(req, NULL, NULL);
610 req = v9fs_twrite(v9p, 1, 0, write_count, buf, 0);
611 v9fs_req_wait_for_reply(req, NULL);
612 v9fs_rwrite(req, &count);
613 g_assert_cmpint(count, ==, write_count);
615 g_free(buf);
616 g_free(wnames[0]);
619 static void fs_flush_success(QVirtIO9P *v9p)
621 char *const wnames[] = { g_strdup(QTEST_V9FS_SYNTH_FLUSH_FILE) };
622 P9Req *req, *flush_req;
623 uint32_t reply_len;
624 uint8_t should_block;
626 fs_attach(v9p);
627 req = v9fs_twalk(v9p, 0, 1, 1, wnames, 0);
628 v9fs_req_wait_for_reply(req, NULL);
629 v9fs_rwalk(req, NULL, NULL);
631 req = v9fs_tlopen(v9p, 1, O_WRONLY, 0);
632 v9fs_req_wait_for_reply(req, NULL);
633 v9fs_rlopen(req, NULL, NULL);
635 /* This will cause the 9p server to try to write data to the backend,
636 * until the write request gets cancelled.
638 should_block = 1;
639 req = v9fs_twrite(v9p, 1, 0, sizeof(should_block), &should_block, 0);
641 flush_req = v9fs_tflush(v9p, req->tag, 1);
643 /* The write request is supposed to be flushed: the server should just
644 * mark the write request as used and reply to the flush request.
646 v9fs_req_wait_for_reply(req, &reply_len);
647 g_assert_cmpint(reply_len, ==, 0);
648 v9fs_req_free(req);
649 v9fs_rflush(flush_req);
651 g_free(wnames[0]);
654 static void fs_flush_ignored(QVirtIO9P *v9p)
656 char *const wnames[] = { g_strdup(QTEST_V9FS_SYNTH_FLUSH_FILE) };
657 P9Req *req, *flush_req;
658 uint32_t count;
659 uint8_t should_block;
661 fs_attach(v9p);
662 req = v9fs_twalk(v9p, 0, 1, 1, wnames, 0);
663 v9fs_req_wait_for_reply(req, NULL);
664 v9fs_rwalk(req, NULL, NULL);
666 req = v9fs_tlopen(v9p, 1, O_WRONLY, 0);
667 v9fs_req_wait_for_reply(req, NULL);
668 v9fs_rlopen(req, NULL, NULL);
670 /* This will cause the write request to complete right away, before it
671 * could be actually cancelled.
673 should_block = 0;
674 req = v9fs_twrite(v9p, 1, 0, sizeof(should_block), &should_block, 0);
676 flush_req = v9fs_tflush(v9p, req->tag, 1);
678 /* The write request is supposed to complete. The server should
679 * reply to the write request and the flush request.
681 v9fs_req_wait_for_reply(req, NULL);
682 v9fs_rwrite(req, &count);
683 g_assert_cmpint(count, ==, sizeof(should_block));
684 v9fs_rflush(flush_req);
686 g_free(wnames[0]);
689 typedef void (*v9fs_test_fn)(QVirtIO9P *v9p);
691 static void v9fs_run_pci_test(gconstpointer data)
693 v9fs_test_fn fn = data;
694 QVirtIO9P *v9p = qvirtio_9p_pci_start();
696 if (fn) {
697 fn(v9p);
699 qvirtio_9p_pci_stop(v9p);
702 static void v9fs_qtest_pci_add(const char *path, v9fs_test_fn fn)
704 qtest_add_data_func(path, fn, v9fs_run_pci_test);
707 int main(int argc, char **argv)
709 g_test_init(&argc, &argv, NULL);
710 v9fs_qtest_pci_add("/virtio/9p/pci/nop", NULL);
711 v9fs_qtest_pci_add("/virtio/9p/pci/config", pci_config);
712 v9fs_qtest_pci_add("/virtio/9p/pci/fs/version/basic", fs_version);
713 v9fs_qtest_pci_add("/virtio/9p/pci/fs/attach/basic", fs_attach);
714 v9fs_qtest_pci_add("/virtio/9p/pci/fs/walk/basic", fs_walk);
715 v9fs_qtest_pci_add("/virtio/9p/pci/fs/walk/no_slash", fs_walk_no_slash);
716 v9fs_qtest_pci_add("/virtio/9p/pci/fs/walk/dotdot_from_root",
717 fs_walk_dotdot);
718 v9fs_qtest_pci_add("/virtio/9p/pci/fs/lopen/basic", fs_lopen);
719 v9fs_qtest_pci_add("/virtio/9p/pci/fs/write/basic", fs_write);
720 v9fs_qtest_pci_add("/virtio/9p/pci/fs/flush/success", fs_flush_success);
721 v9fs_qtest_pci_add("/virtio/9p/pci/fs/flush/ignored", fs_flush_ignored);
723 return g_test_run();