Improving the speed of make test

Andrew Bartlett abartlet at samba.org
Mon Mar 5 00:36:57 MST 2012


Jelmer and others interested in selftest:

A while back, I started doing some profiling to determine where the time
is spent in 'make test', using 'perf'.

I was surprised to find that 15% of our time is spent in routines
associated with SHA1, due to adding users and kinit.  Both of these run
a *lot* of SHA1, because salting the password for the AES-based kerberos
keys uses multiple thousands of rounds of SHA1, to make brute forcing
the password hash harder. 

The fix is simple:
 - change acl.py and similar tests not to create a user for each unit
test, but re-use one for the whole testsuite
 - kinit once at the start of make test, for all connections that should
be made as administrator.  Use that credential cache for all connections
instead of $USERNAME and $PASSWORD
 - create another user if we ever need to modify the groups of the
administrator (the cached PAC won't update). 

I've not got around to doing this yet, but as the python selftest
rewrite is under way, I wanted to ensure this was catered for in the
design. 

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list