new socket-wrapper test case and questions around how we ensure quality with the socket wrapper code

Richard Sharpe realrichardsharpe at gmail.com
Wed May 11 16:02:38 UTC 2016


On Wed, May 11, 2016 at 8:45 AM, Andreas Schneider <asn at samba.org> wrote:
> On Wednesday, May 11, 2016 08:32:10 AM Richard Sharpe wrote:
>> Hi folks,
>>
>> Attached is my now working test case for what net ads dns
>> gethostbyname is doing.
>>
>> Along the way, I realized that the testing infrastructure is very
>> important and it is important to ensure that the test cases are
>> correct.
>>
>> So, I tested:
>>
>> 1. Outside the socket wrapper tests by running my test stand-alone,
>> and it succeeds.
>>
>> 2. Under the current socket wrapper code without my patch, and it
>> fails, as I expect.
>>
>> However, if I send in a single patch that contains both the new test
>> case and the fix, whoever merges the code cannot verify that the test
>> case is worthwhile.
>>
>> On the other hand, if I send in two patches, and someone merges them
>> both and pushes, there will be two commits between which the tests
>> will fail.
>>
>> Perhaps I should submit three patch files. One with my new test case,
>> one with the fixes for the socket wrapper code, and one squashed.
>>
>> Any comments?
>
> Please send two patches, the first fixing the issue and the second providing
> the testcase.
>
> I normally apply them run the tests, call 'git revert' on the fix command and
> test it, then if it fails, remove the change and commit it. This way git
> bisect keeps working :)

OK, great. I will likely do that tonight after I have tested my fix locally.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list