tests/test-filter-mirror:add filter-mirror unit test
In this unit test we will test the mirror function. start qemu with: -netdev socket,id=qtest-bn0,fd=sockfd -device e1000,netdev=qtest-bn0,id=qtest-e0 -chardev socket,id=mirror0,path=/tmp/filter-mirror-test.sock,server,nowait -object filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0 We inject packet to netdev socket id = qtest-bn0, filter-mirror will copy and mirror the packet to mirror0. we read packet from mirror0 and then compare to what we injected. Signed-off-by: NZhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NJason Wang <jasowang@redhat.com>
Showing
tests/test-filter-mirror.c
0 → 100644
想要评论请 注册 或 登录