2008-05-11 01:38:56 +04:00
/*
Unix SMB / CIFS implementation .
SMB torture tester
Copyright ( C ) Andrew Tridgell 1997 - 2003
Copyright ( C ) Jelmer Vernooij 2006
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
# include "includes.h"
# include "system/time.h"
# include "param/param.h"
2008-10-20 20:59:51 +04:00
# include "torture/smbtorture.h"
2011-12-03 10:03:35 +04:00
# include "lib/util/samba_modules.h"
2008-05-11 01:38:56 +04:00
_PUBLIC_ int torture_numops = 10 ;
_PUBLIC_ int torture_entries = 1000 ;
_PUBLIC_ int torture_failures = 1 ;
_PUBLIC_ int torture_seed = 0 ;
_PUBLIC_ int torture_numasync = 100 ;
struct torture_suite * torture_root = NULL ;
2017-04-25 00:41:26 +03:00
bool torture_register_suite ( TALLOC_CTX * mem_ctx , struct torture_suite * suite )
2008-05-11 01:38:56 +04:00
{
if ( ! suite )
return true ;
if ( torture_root = = NULL )
2017-04-25 00:41:26 +03:00
torture_root = talloc_zero ( mem_ctx , struct torture_suite ) ;
2008-05-11 01:38:56 +04:00
return torture_suite_add_suite ( torture_root , suite ) ;
}
2017-04-25 00:27:36 +03:00
_PUBLIC_ int torture_init ( TALLOC_CTX * mem_ctx )
2008-05-11 01:38:56 +04:00
{
2017-04-20 22:24:43 +03:00
# define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
2010-11-01 07:38:37 +03:00
STATIC_smbtorture_MODULES_PROTO ;
2011-12-03 10:03:35 +04:00
init_module_fn static_init [ ] = { STATIC_smbtorture_MODULES } ;
2017-04-25 00:27:36 +03:00
init_module_fn * shared_init = load_samba_modules ( mem_ctx , " smbtorture " ) ;
2008-05-11 01:38:56 +04:00
2017-04-25 00:27:36 +03:00
run_init_functions ( mem_ctx , static_init ) ;
run_init_functions ( mem_ctx , shared_init ) ;
2008-05-11 01:38:56 +04:00
talloc_free ( shared_init ) ;
return 0 ;
}