[PATCH] smbtorture3 small improvements

Andreas Schneider asn at samba.org
Fri Oct 19 20:03:08 UTC 2018


On Friday, 19 October 2018 17:47:08 CEST Jeremy Allison wrote:
> On Fri, Oct 19, 2018 at 03:35:24PM +0200, Andreas Schneider via samba-
technical wrote:
> > Hello,
> > 
> > We have several issues with smbtorture3. You can't run them twice because
> > the don't clean up afterwards. Thus tests are failing because the files
> > they want to create already exists.
> > 
> > Issues in particular have:
> > 
> > CREATETIME
> > STREAMERROR
> > CLENAUP2
> > CHAIN3
> > 
> > 
> > Normally if you write a testing tool you have setup and teardown
> > functions,
> > the setup function create e.g. a test directory and then the teardown
> > function makes sure it gets removed afterwards. The teardown function is
> > called even if the tests fail.
> > 
> > We have a very bad style when it comes to cleaning up in tests in general.
> > In this regard a lot of tests are written badly.
> > 
> > If you want to reproduce, do the following:
> > 
> > rm -rf st
> > make -j8 test TESTS="^samba3.smbtorture_s3.plain"
> > make -j8 test TESTS="^samba3.smbtorture_s3.plain"
> > 
> > The first test run works, the second fails.
> > 
> > 
> > How should cleanup be done, that no files and directories are left around
> > for the tests mentioned above?
> 
> I've also come across this and wrestled with it.
> 
> The problem is if the tests fail you might want to
> see what debris got left behind in order to investigate
> what exactly is going wrong.
> 
> Maybe default to teardown but add an option that
> allows files to be left when being run manually ?

Yep, currently the test tries to delete the test directories before it run, 
but it fails with ACCESS_DENIED ...


	Andreas

-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list