abartlet at samba.org
Tue Jul 31 02:26:18 MDT 2012
On Mon, 2012-07-30 at 06:48 -0700, Andrew Klaassen wrote:
> --- On Sun, 7/29/12, Andrew Bartlett <abartlet at samba.org> wrote:
> > I've not looked at this particular case, but in general, requests for
> > review with substantial unit tests integrated into the Samba 'make test'
> > system are a lot easier to accept, because we know we can't accidentally
> > break them.
> Makes sense.
> The primary thing the module needs to test is which file gets created/accessed/stat'd/deleted on the server's disk when the client makes a request.
> For example, if a client running as user 'dave' on IP '10.0.0.1' requests '/Avid MediaFiles/MXF/2/msmMMOB.mdb', the server needs to give it '/Avid MediaFiles/MXF/2/msmMMOB.mdb_dave_10.0.0.1'.
> But if a client requests '/foo/bar.abc', it should get that file, not a suffixed version of the file.
> Is there any getting-started-with-make-test-on-Samba guide, or any place in the source that'd be particularly useful for me to look at?
There isn't a really good guide, but I need to write a very similar test
for vfs_shadow_copy2. My plan there is to pre-populate a directory in
the source tree or during my test (say in selftest/target/Samba3.pm) and
then set a share as using this module. In my case I'll add an
smbtorture test in source3/selftest/tests.py, but in your case I suggest
either a python test using the python SMB interface, or a shell-based
'blackbox' test like source3/script/tests/test_smbclient.sh.
I hope this is of some guidance.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical