All of lore.kernel.org
 help / color / mirror / Atom feed
* How to test my patch before I post it to public?
@ 2012-04-29 15:21 wang zhihao
  2012-04-30  9:16 ` George Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: wang zhihao @ 2012-04-29 15:21 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Hi , All

I 'm a green hand and interested in open source development. I have a general question “How to test my patch before I post it to public?” 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?

Thank you very much!

Best Regards
Wang Zhihao
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to test my patch before I post it to public?
  2012-04-29 15:21 How to test my patch before I post it to public? wang zhihao
@ 2012-04-30  9:16 ` George Dunlap
  2012-04-30 14:12   ` wang zhihao
  0 siblings, 1 reply; 7+ messages in thread
From: George Dunlap @ 2012-04-30  9:16 UTC (permalink / raw)
  To: wang zhihao; +Cc: Ian Jackson, Ian Campbell, xen-devel

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 “How to test my patch before I post it to public?” 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to test my patch before I post it to public?
  2012-04-30  9:16 ` George Dunlap
@ 2012-04-30 14:12   ` wang zhihao
  2012-04-30 14:19     ` George Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: wang zhihao @ 2012-04-30 14:12 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 1527 bytes --]

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

在 2012-4-30,下午5:16, George Dunlap 写道:

> 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 “How to test my patch before I post it to public?” 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


[-- Attachment #1.2: Type: text/html, Size: 2106 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to test my patch before I post it to public?
  2012-04-30 14:12   ` wang zhihao
@ 2012-04-30 14:19     ` George Dunlap
  2012-04-30 14:25       ` wang zhihao
  0 siblings, 1 reply; 7+ messages in thread
From: George Dunlap @ 2012-04-30 14:19 UTC (permalink / raw)
  To: wang zhihao; +Cc: Ian Jackson, Ian Campbell, xen-devel

On Mon, Apr 30, 2012 at 3:12 PM, wang zhihao <accept.acm@gmail.com> wrote:
> Hi George:
>
>   Thanks for your guides, But I don't know what "combination" means.  Could
> you tell me more about it?

I can't really give you an example without an example to work with.
:-)  What does your patch do?

 -George

>
> Best Regards
> Wang Zhihao
>
> 在 2012-4-30,下午5:16, George Dunlap 写道:
>
> 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 "How to test my patch before I post it to public?" 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
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to test my patch before I post it to public?
  2012-04-30 14:19     ` George Dunlap
@ 2012-04-30 14:25       ` wang zhihao
  2012-04-30 14:46         ` George Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: wang zhihao @ 2012-04-30 14:25 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell

Hi George:

I don't have a patch now, but may have one in future. : P

Ok, I will try to make a patch and then ask this question : )

Regards
Wang zhihao

在 2012-4-30,下午10:19, George Dunlap 写道:

> On Mon, Apr 30, 2012 at 3:12 PM, wang zhihao <accept.acm@gmail.com> wrote:
>> Hi George:
>> 
>>  Thanks for your guides, But I don't know what "combination" means.  Could
>> you tell me more about it?
> 
> I can't really give you an example without an example to work with.
> :-)  What does your patch do?
> 
> -George
> 
>> 
>> Best Regards
>> Wang Zhihao
>> 
>> 在 2012-4-30,下午5:16, George Dunlap 写道:
>> 
>> 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 "How to test my patch before I post it to public?" 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
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to test my patch before I post it to public?
  2012-04-30 14:25       ` wang zhihao
@ 2012-04-30 14:46         ` George Dunlap
  2012-04-30 15:10           ` wang zhihao
  0 siblings, 1 reply; 7+ messages in thread
From: George Dunlap @ 2012-04-30 14:46 UTC (permalink / raw)
  To: wang zhihao; +Cc: Ian Jackson, Ian Campbell, xen-devel

On 30/04/12 15:25, wang zhihao wrote:
> Hi George:
>
> I don't have a patch now, but may have one in future. : P
>
> Ok, I will try to make a patch and then ask this question : )
Well, as I said, the general idea is, "try to break it". If you add a
new option, for instance, check to make sure that it works right:
* If you put in a reasonable value
* If you put in an unreasonably high value
* If you put in a negative number
* If you don't specify the option at all
* If you put a string instead of a number

Make sense?

-George

>
> Regards
> Wang zhihao
>
> 在 2012-4-30,下午10:19, George Dunlap 写道:
>
>> On Mon, Apr 30, 2012 at 3:12 PM, wang zhihao <accept.acm@gmail.com> wrote:
>>> Hi George:
>>>
>>>  Thanks for your guides, But I don't know what "combination" means.  Could
>>> you tell me more about it?
>> I can't really give you an example without an example to work with.
>> :-)  What does your patch do?
>>
>> -George
>>
>>> Best Regards
>>> Wang Zhihao
>>>
>>> 在 2012-4-30,下午5:16, George Dunlap 写道:
>>>
>>> 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 "How to test my patch before I post it to public?" 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
>>>
>>>
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xen.org
>>> http://lists.xen.org/xen-devel
>>>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to test my patch before I post it to public?
  2012-04-30 14:46         ` George Dunlap
@ 2012-04-30 15:10           ` wang zhihao
  0 siblings, 0 replies; 7+ messages in thread
From: wang zhihao @ 2012-04-30 15:10 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell

Hi George:

I got it.  Try some extreme value or invalid input to the running code with my new feature, If the patch is a simple option or something-like which can be easy tested in this way, Right?

Regards
Wang Zhihao


在 2012-4-30,下午10:46, George Dunlap 写道:

> On 30/04/12 15:25, wang zhihao wrote:
>> Hi George:
>> 
>> I don't have a patch now, but may have one in future. : P
>> 
>> Ok, I will try to make a patch and then ask this question : )
> Well, as I said, the general idea is, "try to break it". If you add a
> new option, for instance, check to make sure that it works right:
> * If you put in a reasonable value
> * If you put in an unreasonably high value
> * If you put in a negative number
> * If you don't specify the option at all
> * If you put a string instead of a number
> 
> Make sense?
> 
> -George
> 
>> 
>> Regards
>> Wang zhihao
>> 
>> 在 2012-4-30,下午10:19, George Dunlap 写道:
>> 
>>> On Mon, Apr 30, 2012 at 3:12 PM, wang zhihao <accept.acm@gmail.com> wrote:
>>>> Hi George:
>>>> 
>>>> Thanks for your guides, But I don't know what "combination" means.  Could
>>>> you tell me more about it?
>>> I can't really give you an example without an example to work with.
>>> :-)  What does your patch do?
>>> 
>>> -George
>>> 
>>>> Best Regards
>>>> Wang Zhihao
>>>> 
>>>> 在 2012-4-30,下午5:16, George Dunlap 写道:
>>>> 
>>>> 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 "How to test my patch before I post it to public?" 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
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xen.org
>>>> http://lists.xen.org/xen-devel
>>>> 
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-30 15:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-29 15:21 How to test my patch before I post it to public? wang zhihao
2012-04-30  9:16 ` George Dunlap
2012-04-30 14:12   ` wang zhihao
2012-04-30 14:19     ` George Dunlap
2012-04-30 14:25       ` wang zhihao
2012-04-30 14:46         ` George Dunlap
2012-04-30 15:10           ` wang zhihao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.