/
virtio-fs-testing-requirement.txt
75 lines (49 loc) · 2.43 KB
/
virtio-fs-testing-requirement.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
To verify sanity of virtiofs we should run following tests at a minimum and
make sure there are no regressions.
- pjdfstests
https://github.com/pjd/pjdfstest
- xfstests (quick)
git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
- unionmount-testsuite (overlayfs over virtiofs)
https://github.com/amir73il/unionmount-testsuite
xfstest virtiofs configuration
==============================
1. Run two virtiofsd instances on host.
$ ./virtiofsd --socket-path=/tmp/vhostqemu1 -o source=/mnt/virtiofs-source1/ -o xattr --daemonize
$ ./virtiofsd --socket-path=/tmp/vhostqemu2 -o source=/mnt/virtiofs-source2/ -o xattr --daemonize
2. Configure qemu to export two virtiofs instances. Append following.
-object memory-backend-file,id=mem,size=32G,mem-path=/dev/shm,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/tmp/vhostqemu1 -device vhost-user-fs-pci,chardev=char0,tag=myfs1,queue-size=1024 -chardev socket,id=char1,path=/tmp/vhostqemu2 -device vhost-user-fs-pci,chardev=char2,tag=myfs2,queue-size=1024
3. Boot into guest and pull in xfstests and install all needed packages
from README. Create a config file "local.config" with following.
export TEST_DEV=myfs1
export TEST_DIR=/mnt/virtiofs1
export SCRATCH_DEV=myfs2
export SCRATCH_MNT=/mnt/virtiofs2
export FSTYP=virtiofs
4. Run xfstests quick tests and make sure there are no regressions.
$ ./check -g quick
unionmount-testsuite (overlay over virtiofs)
============================================
- Mount a virtiofs instance
$ mount -t virtiofs myfs1 /mnt/virtiofs1
$ mkdir -p /mnt/virtiofs1/test/
$ export UNIONMOUNT_BASEDIR="/mnt/virtiofs1/test"
$ cd unionmount-testsuite
There are many configurations one can run tests in. Some of the suggested
ones are.
$ ./run --ov
$ ./run --ov --meta
$ ./run --ov --meta --verify
$ ./run --ov=10 --meta --verify
xfstest overlay tests (overlay over virtiofs)
=============================================
- Mount a virtiofs instance
$ mount -t virtiofs myfs1 /mnt/virtiofs1
$ mkdir -p /mnt/virtiofs1/xfstest-testdev -p /mnt/virtiofs1/xfstest-scratchdev
- Drop following local.config in xfstest/ git tree.
export TEST_DEV=/mnt/virtiofs/xfstest-testdev
export TEST_DIR=/mnt/virtiofs/xfstest-testdev
export SCRATCH_DEV=/mnt/virtiofs/xfstest-scratchdev
export SCRATCH_MNT=/mnt/virtiofs/xfstest-scratchdev
- Run overlay tests and make sure there are no regressions.
./check -overlay overlay/0[0-9][0-9]