[PATCHES] two small patches

Andreas Schneider asn at samba.org
Mon Feb 12 13:57:11 UTC 2018


On Friday, 9 February 2018 04:49:26 CET Douglas Bagnall via samba-technical 
wrote:
> Whilst chasing a flapping test, I tried to run it in a loop in a
> testenv, like this:
> 
>      for i in {1..200}; do
>           echo $i
>           time  python -m samba.subunit.run \
>             samba.tests.samba_tool.user_wdigest || break
>      done
> 
> and I noticed two things: it got slower and slower, and it never failed
> at the process level even when I put in deliberate failures.
> 
> The slower and slower part is addressed by the first patch. This test
> adds and deletes the same user 30 times while the loop above runs the
> test 200 times. That adds the same user 6000 times. Currently the
> newuser() code ends up searching for the user using samaccountname, but
> samaccountname is retained on deleted objects, so the index ends up
> finding 6000 users. If we search instead using the DN it is quicker.
> 
> The test never failed because of a bug in our TestRunner class, which
> does not look after the wasSuccessful() method it inherited from
> unittest.TestRunner.

RB+

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org





More information about the samba-technical mailing list