[PATCH] samba-tool: Adding/removing none-existent users to/from groups doesn't fail

Marc Muehlfeld mmuehlfeld at samba.org
Fri Oct 17 17:22:17 MDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Michael,

thanks for looking at my patch.


Am 17.10.2014 um 12:08 schrieb Michael Adam:
> FYI: failed autobuild twice for me
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [1656/1688 in 1h40m22s] 
> samba4.blackbox.group.py UNEXPECTED(failure): 
> samba4.blackbox.group.py.group addmembers(none) REASON: 
> _StringException: _StringException: ERROR(exception): Failed to
> add members "newuser,newuser1" to group "dsg" - Unable to find 
> "newuser". Operation cancelled. File 
> "bin/python/samba/netcmd/group.py", line 217, in run 
> add_members_operation=True) File "bin/python/samba/samdb.py", line 
> 263, in add_remove_group_members raise Exception('Unable to find 
> "%s". Operation cancelled.' % member)
> 
> FAILED (1 failures, 0 errors and 0 unexpected successes in 0 
> testsuites) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Apparently it was premature?


I haven't fully understood how the test stuff works. So please excuse,
if the following is a stupid though or wrong. :-)


I'm thinking, the test is wrong:


The failed test is in source4/setup/tests/blackbox_group.sh. In this
file, first two user accounts are created ('testuser' and 'testuser1'):

testit "user add" $samba_tool user create $CONFIG --given-name="User"
- --surname="Tester" --initial="UT" testuser testp at ssw0Rd
testit "user add" $samba_tool user create $CONFIG --given-name="User1"
- --surname="Tester" --initial="UT" testuser1 testp at ssw0Rd


Then later the users 'newuser' and 'newuser' should be added to
different groups:
testit "group addmembers" $samba_tool group addmembers $CONFIG dsg
newuser,newuser1
...



Do I understand this test right, when I think, that it creates
accounts and then tries to add (other) non existend accounts to the
groups? In that case, my enhancement did what it should - it prints an
error and quit. :-)

Is this correct? Then I would try to fix the test.



Regards,
Marc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUQaSgAAoJEFNERvHO3m51ma0IALz4huxkR1LrD71lFXddwP5x
HX9wmD69kd240aHkOVGnX6ahzzvDayililVDXm5Tb5OYV+4pYGzMyMO2psOvBlq8
xVTyHz35zs9GMn1ZdfeAvHPVvHAV2SyvpMfKij9M2O8nAPR7YMAnFD3KFTiQeGTI
XFT+Z61grRx++/vRdUAeLyKHjJ823lmlttB1PUHAKKbBfcHGSVyHGxKLjAKxluU2
r4mm3osLp9jP6mnjfommqby9hsUDL9DJcyGduhRCQBNsf67nf1C+j1mPJybeEzl8
Q9/bz06OMzp3xM6S9dMRFt6cYDBUDDASXicc/0NXsR32bQj31GRKShGGbqngeZQ=
=UeS3
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list