1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-17 20:55:34 +02:00

test: Switch to qemu -netdev stream option instead of using qrap

qemu commit 13c6be96618c ("net: stream: add unix socket") introduces
support for native AF_UNIX support, finally making qrap useless.

We can't quite drop that yet until a qemu release includes it, and
then we'll need to wait a while for users to switch anyway, but at
least for tests, we can use that support.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2022-11-04 02:16:21 +01:00
parent 1401962a37
commit 667397db11
7 changed files with 75 additions and 77 deletions
test/demo

View file

@ -85,7 +85,7 @@ guest cd passt
gout TARGET_PID pgrep -P $(cat pasta.pid)
sleep 1
passtb ./passt -f -t 10001,10003
passtb ./passt -f -t 10001,10003 -s __STATEDIR__/passt.socket
sleep 2
guest nsenter -t __TARGET_PID__ -U -n --preserve-credentials
@ -93,14 +93,11 @@ sleep 5
nl
nl
say We're ready to start qemu with the qrap wrapper,
say We're ready to start qemu
nl
say that we currently need to connect the netdev
nl
say back-end to passt's UNIX domain socket.
sleep 2
hout VMLINUZ echo "/boot/vmlinuz-$(uname -r)"
guest ./qrap 5 qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -initrd ../passt.img -nographic -serial stdio -nodefaults -append "console=ttyS0 virtio-net.napi_tx=1" -device virtio-net-pci,netdev=hostnet0,x-txburst=16384 -netdev socket,fd=5,id=hostnet0
guest qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -initrd ../passt.img -nographic -serial stdio -nodefaults -append "console=ttyS0" -device virtio-net-pci,netdev=s0 -netdev stream,id=s0,server=off,addr.type=unix,addr.path=__STATEDIR__/passt.socket
sleep 10
nl