Converting SMB1 tests to SMB2

Ralph Boehme slow at samba.org
Wed Oct 23 10:05:11 UTC 2019


Hi Noel,

On 10/23/19 11:56 AM, npower wrote:
> On 18/10/2019 18:10, Ralph Boehme wrote:
>> env.OPTIONS += " --mitkrb5 --exclude=${srcdir}/selftest/skip-smb1"
> why do we need to add  '--mitkrb5' ?

oh, sorry, copy/paste mistake. We don't need that. :)

>>>>> 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.
>>>> I guess one of the first things I'd look as is all the torture tests
>>>> that run against both nt4_dc and ad_dc. I guess for most it's ok to just
>>>> run them against either one.
>>> not sure I get what you mean here, what is the significance of tests
>>> that run against these environments (I realise this is probably
>>> obvious... but not to me :-))))
>> I guess that's just historical practice. Look at s3/selftest/tests.py,
>> the final else for the block that sets up the smbtorture test is
>>
>> else:
>>     plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp \
>>        -U$USERNAME%$PASSWORD')
>>     plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp \
>>         -U$USERNAME%$PASSWORD')
>>
>> For most tests this is not needed and it bloats your list of failing tests.
> 
> ok, I probably will need help to figure out when this is needed or not
> (or some recipe to determine that) and same for lots of other things,
> but.... lets not worry about that for now, there must be plenty of low
> hanging fruit to start with (low hanging fruit == "smb1 tests that have
> smb2 equivalents) that could be removed. My current WIP branch (with a
> skip approach) is
> https://gitlab.com/samba-team/devel/samba/commits/npower_exclude_smb1failures
> 
> This branch sets the test envs with 'min protocol = SMB2_02' and
> provides a skip file with the current list of failing tests. The skip
> file inclusion and test environment manipulation are *not* optional in
> this branch (effectively this branch hardcodes SMB2 only)
> 
> The question now is how to proceed with this in a workable way, I am
> presuming that we can't just switch over to SMB2 and leave a whole pile
> of effectively disabled tests :-) and this is where I was coming from
> with the idea of moving the failing tests to smb1 environments (the
> intention was then to create some new test jobs to run the failing tests
> with these environments). Since we now have a list of tests in a skip
> file, the same file could also be used as a test list source [2] we just
> need some scaffolding in the test code to adjust the test environment
> 'min protocol' settings bases on some switch, flag, env variable or
> whatever.
> 
> In otherwords I'd like to
> 
> a) make the tests use 'min protocol = SMB2_02' by default and
> additionally use the skip file
> 
> b) run the tests defined in the skip file in new jobs [3] where the
> existing environments somehow get the *old* 'min protocol' values.

Why? Sorry, but I don't understand why you want to do that. Once we have
the skiplist with failing tests, we just have to get down and dirty and
work our way through the list one item at a time.

For each item we:

- check is the *same* test already exists as a SMB2 tests

- if no: rewrite test as smb2 test

- remove smb1 test, remove entry from skip list

Am I missing something?

Thanks!
-slow

-- 
Ralph Boehme, Samba Team                https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46



More information about the samba-technical mailing list