[PATCH] DRAFT: Add new test which covers force user bug

Andrew Bartlett abartlet at samba.org
Fri Dec 4 20:26:52 UTC 2015

On Fri, 2015-12-04 at 17:18 +0100, Robin Hack wrote:
> Hi samba.
> First of all, please let me introduce myself.
> My name is Robin Hack and I work for Red Hat as a QE for RHEL Samba
> package
> for ~2.5 years.
> It looks like I and my tests discovered some regressions in upstream
> Samba.
> However I stayed in shadows. Until now ;).
> I wrote lot of tests for Samba but they are not compatible with Samba
> upstream testsuite mainly because:
> tests written in Red Hat...
> - uses bash + BeakerLib
> - cover whole code path. From samba to kernel.
> - different infrastructure
> - ...
> I feel I own samba upstream something... lot of people from here
> helped me
> with samba testing and with my cwrap.org contributions.
> Long story short:
> I would like to rewrite some of my tests and raise upstream coverage
> of
> Samba code.


> Attached file is my first try to rewrite test to shape acceptable by
> Samba
> upstream. Please. Be patient. It's not easy to add new tests to Samba
> upstream testsuite :(.

We also welcome contributions to how we build tests.  I'm open to
reasonable extra dependencies (with the understanding that we use
subunit v1 as our test reporting language). 

> How to test my test:
> $ make -j test TESTS="samba3.blackbox.forceuser"
> Should PASS
> $ git revert cf0934caf282f4ade8c8a701b0e40b68a2f17ace
> $ make -j test TESTS="samba3.blackbox.forceuser"
> Should FAIL

Can you run those against a specific share in the existing map_to_guest
environment, rather than needing a whole new environment?

Also please take care where you place your test.  The python block
currently covering "for env in ["fileserver"] extends to below the TAR
tests, and you have moved those tests into "forceuser".

Other than that, it looks like you are on the right track, and I'm
really keen to help you improve our testsuite.


Andrew Bartlett

Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list