qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V2 3/3] tests/test-filter-redirector: Add unit t


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH V2 3/3] tests/test-filter-redirector: Add unit test for filter-redirector
Date: Wed, 2 Mar 2016 14:47:09 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1


On 02/29/2016 08:23 PM, Zhang Chen wrote:
> In this unit test,we will test the filter redirector function.
>
> Start qemu with:
>
>         "-netdev tap,id=qtest-bn0 "

Please don't use tap since it needs

- CAP_NET_ADMIN
- if-up script

Neither of above could not be true for a qtest environment.

>         "-device rtl8139,netdev=qtest-bn0,id=qtest-e0 "
>         "-chardev socket,id=redirector0,path=%s,server,nowait "
>         "-chardev socket,id=redirector1,path=%s,server,nowait "
>         "-object filter-redirector,id=qtest-f1,netdev=qtest-bn0,"
>         "queue=tx,indev=redirector1 "
>         "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0,"
>         "queue=tx,outdev=redirector0 "
>
> We inject packet to -chardev redirector1,then filter-redirector
> will pass it to filter, another filter-redirector get it and
> redirect it to redirector0,we read packet from redirector0
> and compare to what we inject.

Looks correct but I think queue='rx' should also be tested here. How about:

- using backend
- redirect tx traffic to a chardev, then inject packet from socket and
read it from chardev
- redirect from another chardev to rx traffic, then inject packet from
chardev and read if from socket?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]