Converting SMB1 tests to SMB2

Noel Power nopower at suse.com
Thu Oct 17 20:14:04 UTC 2019


Hi All

So as a first step I tried (via brute force) e.g. changing the min
protocol definitions in the generated conf files for the test
environments, running the tests and seeing what was failing. I then
disabled (and/or) deleted tests to get to a point where all running
tests pass with 'min protocol = SMB2_02'. The intention here was to
enumerate the tests involved.

I tried to list the tests for each environment (with/without) the
changes, I am attaching the diff of tests here (sorted by test env) be
aware there maybe some minor errors in there, the diffs were ugly and
needed to be tweaked by hand and I most likely made some minor
mistakes.  The build (with brute force changes) to do this can be found 
https://gitlab.com/samba-team/devel/samba/commits/squash-smb2-only

My plan is to first move all of these tests identified above to suitable
smb1 environments (e.g. nt4_dc_smb1) etc. So we

a) can clearly see the tests that need to be deleted/ported/fixed

b) we can immediately delineate the smb1 vs >= smb2 tests  and be sure
we don't lose anything along the way

I've started as a proof of concept
https://gitlab.com/samba-team/devel/samba/commits/separate-smb1-tests to
migrate tests

Does this make sense? I expect it will be a bit time consuming to
separate the tests (when some may be just deleted) so I wonder do others
think it is worth it (personally I do) But I'd like some other opinions
before continuing down that road :-)

In the end I suppose the tests that fail will fall into 1 of the
categories below

a) a test that tests SMB1 only functionality or messages (probably these
can be just deleted)

b) a test that tests SMB1 functionality but doesn't and should test the
same functionality  >=SMB2 (needs porting)

c) A test that maybe isn't essentially SMB1 or greater but that perhaps
fails with the new defaults for some reason. For example;

   + a blackbox test scripts might have some parts working with e.g. NT1
mixed with other bits that are using >= SMB2 (needs rewriting)

   + a python test may have mixed SMB1 & >=SMB2 tests in the same test
module (needs rewriting)

   + some test you would expect should pass with the new min protocol
but doesn't (therefore needs investigation)

So, if anyone can immediately identify say any tests we can just delete
or port from the attached list of test diffs, that would be useful :-)
Could save us some time digging.

thanks,

Noel

On 08/10/2019 13:15, Ralph Boehme via samba-technical wrote:
> Hi David, Noel,
>
> thanks a *lot* for taking care of this!
>
> On 9/27/19 4:54 PM, David Mulder via samba-technical wrote:
>> Noel and I are looking at converting any old SMB tests that target the SMB1 protocols to SMB2+. Is anyone else already working on this? Does anyone have some pointers?
> what exactly are you looking for?
>
> I guess at least the following needs to be covered:
>
> - everything in s3/torture/ that calls torture_open_connection()
>
> - everything in s4/torture/ that calls torture_suite_add_[1|2]smb_test()
>
> Am I missing anything?
>
> -slow
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad-dc-2-changes.log
Type: text/x-log
Size: 313 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ad-dc-2-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad-dc-3-changes.log
Type: text/x-log
Size: 99 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ad-dc-3-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad-dc-4-changes.log
Type: text/x-log
Size: 310 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ad-dc-4-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad-dc-5-changes.log
Type: text/x-log
Size: 3568 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ad-dc-5-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad-dc-6-changes.log
Type: text/x-log
Size: 4678 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ad-dc-6-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fileserver-changes.log
Type: text/x-log
Size: 5740 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/fileserver-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nt4-changes.log
Type: text/x-log
Size: 41510 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/nt4-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ntvfs-changes.log
Type: text/x-log
Size: 35541 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ntvfs-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-changes.log
Type: text/x-log
Size: 2243 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/samba-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admember-changes.log
Type: text/x-log
Size: 2737 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/admember-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o3-changes.log
Type: text/x-log
Size: 6150 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/o3-changes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad-dc-1-changes.log
Type: text/x-log
Size: 19725 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20191017/9526c1be/ad-dc-1-changes.bin>


More information about the samba-technical mailing list