diff options
author | Zhang Chen <zhangchen.fnst@cn.fujitsu.com> | 2016-03-15 15:41:34 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2016-03-30 08:57:16 +0800 |
commit | 06809ecf7312c8653964de661f932a0ed7cd0076 (patch) | |
tree | fd7d2ad85902d2051bbc9e46c659b5c2d4897f18 /tests/Makefile | |
parent | f6d3afb51f47af7bbc600c48cd54003a0b6d0f5e (diff) | |
download | qemu-06809ecf7312c8653964de661f932a0ed7cd0076.tar.gz qemu-06809ecf7312c8653964de661f932a0ed7cd0076.tar.bz2 qemu-06809ecf7312c8653964de661f932a0ed7cd0076.zip |
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: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile index ab185d8647..c47fecccb1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -220,6 +220,7 @@ ifeq ($(CONFIG_VHOST_NET_TEST_i386),) check-qtest-x86_64-$(CONFIG_VHOST_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF) endif check-qtest-i386-y += tests/test-netfilter$(EXESUF) +check-qtest-i386-y += tests/test-filter-mirror$(EXESUF) check-qtest-x86_64-y = $(check-qtest-i386-y) gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)) @@ -580,6 +581,7 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o $(test-util-obj-y) tests/test-write-threshold$(EXESUF): tests/test-write-threshold.o $(test-block-obj-y) tests/test-netfilter$(EXESUF): tests/test-netfilter.o $(qtest-obj-y) +tests/test-filter-mirror$(EXESUF): tests/test-filter-mirror.o $(qtest-obj-y) tests/ivshmem-test$(EXESUF): tests/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y) tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o |