From: wang zhihao Subject: Re: How to test my patch before I post it to public? Date: Mon, 30 Apr 2012 22:12:14 +0800 Message-ID: <068F8B66-CCED-47D3-962E-649293E0EC5C@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/mixed; boundary="===============1232431981702452208==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: George Dunlap , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org --===============1232431981702452208== Content-Type: multipart/alternative; boundary=Apple-Mail-7-1005649548 --Apple-Mail-7-1005649548 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=GB2312 Hi George: =20 Thanks for your guides, But I don't know what "combination" means. = Could you tell me more about it? =20 Best Regards Wang Zhihao =D4=DA 2012-4-30=A3=AC=CF=C2=CE=E75:16=A3=AC George Dunlap =D0=B4=B5=C0=A3= =BA > On Sun, Apr 29, 2012 at 4:21 PM, wang zhihao = wrote: >> Hi , All >>=20 >> I 'm a green hand and interested in open source development. I have a = general question =A1=B0How to test my patch before I post it to = public?=A1=B1 Hope you guys give me some suggestions. : ) >>=20 >> Firstly, I can re-compile the code, to assure no syntax error. = However,I don't know how to test my patch's function is right or not. = Some software requires unit test for each function. Is there anything = similar in xen project? >=20 > There is no unit testing for Xen. What you need to test really > depends on what your patch is doing. The main goal is to exercise the > code you've just added or changed: try to put it in different > combinations to make sure that it works as you expect. Try to break > it, really. :-) >=20 > If you're just tweaking a simple option in the xl config file, then > you need to test a few different combinations to make sure that all > the reasonable combinations work. If you're changing the locks in the > memory management code in the hypervisor, then you need to run a bunch > of benchmarks that exercise that code, probably for several hours. >=20 > If you post your patch to the list (with an appropriate description) > we may be able to give you some suggestions. >=20 > -George --Apple-Mail-7-1005649548 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=GB2312 Hi = George:
 
  Thanks for your guides, But I don't = know what "combination" means.  Could you tell me more about = it?
  
Best Regards
Wang = Zhihao

=D4=DA 2012-4-30=A3=AC=CF=C2=CE=E75:1= 6=A3=AC George Dunlap =D0=B4=B5=C0=A3=BA

On = Sun, Apr 29, 2012 at 4:21 PM, wang zhihao <accept.acm@gmail.com> = wrote:
Hi , All

I 'm a green = hand and interested in open source development. I have a general = question =A1=B0How to test my patch before I post it to public?=A1=B1 = Hope you guys give me some suggestions. : )

Firstly, I can = re-compile the code, to assure no syntax error. However,I don't know how = to test my patch's function is right or not. Some software requires unit = test for each function. Is there anything similar in xen = project?

There is no unit testing for Xen. =  What you need to test really
depends on what your patch is = doing.  The main goal is to exercise the
code you've just added = or changed: try to put it in different
combinations to make sure that = it works as you expect.  Try to break
it, really. :-)

If = you're just tweaking a simple option in the xl config file, then
you = need to test a few different combinations to make sure that all
the = reasonable combinations work.  If you're changing the locks in = the
memory management code in the hypervisor, then you need to run a = bunch
of benchmarks that exercise that code, probably for several = hours.

If you post your patch to the list (with an appropriate = description)
we may be able to give you some suggestions.

= -George

= --Apple-Mail-7-1005649548-- --===============1232431981702452208== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1232431981702452208==--