qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
To: Jason Wang <jasowang@redhat.com>, qemu devel <qemu-devel@nongnu.org>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>,
	Gui jianfeng <guijianfeng@cn.fujitsu.com>,
	"eddie.dong" <eddie.dong@intel.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Yang Hongyang <hongyang.yang@easystack.cn>
Subject: Re: [Qemu-devel] [PATCH V3 2/2] tests/test-filter-mirror:add filter-mirror unit test
Date: Wed, 17 Feb 2016 13:23:58 +0800	[thread overview]
Message-ID: <56C403EE.5060604@cn.fujitsu.com> (raw)
In-Reply-To: <56C167FE.3050803@redhat.com>



On 02/15/2016 01:54 PM, Jason Wang wrote:
>
> On 02/04/2016 03:43 PM, Zhang Chen wrote:
>> From: ZhangChen <zhangchen.fnst@cn.fujitsu.com>
>>
>> Using qtest qmp interface to implement following cases:
>> 1) add/remove filter-mirror
>> 2) add a filter-mirror then delete the netdev
>> 3) add/remove more than one filter-mirrors
>> 4) add more than one filter-mirrors and then delete the netdev
> The steps here is rather similar to test-netfilter.c. Let's try to
> generalize them instead of duplicating codes.

We consider that netfilter need a common test case to test common
function for all filter plugin. so we will remove it in this patch and
write anther patch for netfilter common test in futrue. and now
we will focus on filter-redirector, filter-rewriter and filter-compare.

>> 5) add filter-mirror with:
>>     -object filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0
>>
>>     then inject packet from the socket connected to qtest-bn0,
>>     filter-mirror will copy and mirror the packet to mirror0.
>>     we read packet from mirror0 and then compare to what we inject.
>>     del filter-mirror.
>>
>> we start qemu with:
>> -netdev socket,id=qtest-bn0,listen=127.0.0.1:9005
>> -device e1000,netdev=qtest-bn0,id=qtest-e0
>> -chardev socket,id=mirror0,host=127.0.0.1,port=9003,server,nowait
>> -chardev socket,id=mirror1,host=127.0.0.1,port=9004,server,nowait
> Hardcoded port is not good here since it may cause false positive
> (consider the tests may be trigged by lots of automated script both
> upstream and downstream). A better solution is using socketpair(2) and
> passing pre-created fd(s) to file chardev.

I will fix it in next patch

Thanks
zhangchen

>> Signed-off-by: zhangchen <zhangchen.fnst@cn.fujitsu.com>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>>
> [...]
>
>
> .
>

-- 
Thanks
zhangchen

      reply	other threads:[~2016-02-17  5:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04  7:43 [Qemu-devel] [PATCH V3 0/2] net/filter-mirror:add filter-mirror and unit test Zhang Chen
2016-02-04  7:43 ` [Qemu-devel] [PATCH V3 1/2] net/filter-mirror:Add filter-mirror Zhang Chen
2016-02-04  9:00   ` Zhang Chen
2016-02-15  5:23     ` Jason Wang
2016-02-15  7:06       ` Zhang Chen
2016-02-17  3:53         ` Zhang Chen
2016-02-23  1:50           ` Jason Wang
2016-02-04  7:43 ` [Qemu-devel] [PATCH V3 2/2] tests/test-filter-mirror:add filter-mirror unit test Zhang Chen
2016-02-15  5:54   ` Jason Wang
2016-02-17  5:23     ` Zhang Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C403EE.5060604@cn.fujitsu.com \
    --to=zhangchen.fnst@cn.fujitsu.com \
    --cc=dgilbert@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).