(flakey autobuild) s3:torture: add idmap_tdb_common test code
abartlet at samba.org
Tue May 1 15:42:29 MDT 2012
On Tue, 2012-05-01 at 23:20 +0200, Christian Ambach wrote:
> On 05/01/2012 01:22 PM, Andrew Bartlett wrote:
> > On Tue, 2012-05-01 at 11:08 +0200, Christian Ambach wrote:
> > I'm sorry, but I've had to revert the invocation of this test, as it was
> > causing a flakey autobuild.
> I am sorry for causing this.
> > The reason is the above: You must never write to a filesystem location
> > outside out test prefix during make test. In this case it failed with a
> > segfault due to:
> I should have thought about multiple invocations of the test
> at the same time (or not) and that /tmp is not a good place to put the
> database into.
> I have submitted a follow-up patch to autobuild that stores the database
> in the private directory, hopefully that fixes the issue and the test
> can remain in the list of tests to be executed on each build.
> Once again, sorry.
Thanks for doing that. It would be even better if you used mkdtemp() to
make a private dir inside the test area. That's what the smbtorture
framework in source4 does for the output dir. This would ensure that
when we move to parallel tests, or if the test is re-run manually, that
we do not step on the previous database.
You should also cleanup the old database on exit.
Finally, it would be really good to see new tests like this could be
written in the source4/torture environment supported by lib/torture.
There we get managed services like a pristine output directory
(torture_temp_dir()), and the subunit framework for reporting errors.
With the top level build, it is quite reasonable to link in almost any
other waf subsystem when required for testing, and code such as the code
you have written here isn't dependent on very much anyway.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical