Converting SMB1 tests to SMB2
Jeremy Allison
jra at samba.org
Wed Oct 2 16:18:29 UTC 2019
On Wed, Oct 02, 2019 at 07:43:40AM +0200, Andreas Schneider wrote:
> On Tuesday, 1 October 2019 22:55:35 CEST Jeremy Allison via samba-technical
> wrote:
> > On Fri, Sep 27, 2019 at 02:54:08PM +0000, 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?
> > "Congratulations, you've decided to clean the elevator... !" (from
> > the movie Dark Star :-).
> >
> > No, no one else is working on this I'm afaid. As I add
> > new tests I usually make sure they're SMB2+ only, as
> > that's what we want to target going forward.
> >
> > Best advice I can give is to move them over one
> > at a time, probably starting with the isolated
> > ones.
> >
> > As you move them, take the opportunity to clean
> > up some of the old failure paths - ensuring they
> > start and end with a clean and empty directory
> > tree. Some of our flaky tests have been caused
> > by 'old' data being left from a previous test.
>
> Also allow via an environment variable to not do the cleanup afterwards!
Oh that's a good point to be able to debug test failures,
thanks Andreas !
> TORTURE_SKIP_CLEANUP=1
>
>
> Also we had a very bad practice with torture tests! We need to change that.
> Make sure that always torture_assert_*_goto() is used and that the goto cleans
> up (memory, connections, etc.). A test should run with asan, ubsan, etc.
>
> In case of a failure the test should return the state and not always true!
>
> An example for a well written torture test is:
>
> source4/torture/rpc/iremotewinspool_driver.c
>
>
> Just my 2 cents ;-)
>
>
> Andreas
>
> --
> Andreas Schneider asn at samba.org
> Samba Team www.samba.org
> GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
>
>
More information about the samba-technical
mailing list