[PATCH] smbtorture3 small improvements
Jeremy Allison
jra at samba.org
Fri Oct 26 19:24:23 UTC 2018
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?
LGTM. RB+ and pushed.
More information about the samba-technical
mailing list