LCOV - code coverage report
Current view: top level - source4/torture - torture.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 12 13 92.3 %
Date: 2021-09-23 10:06:22 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /* 
       2             :    Unix SMB/CIFS implementation.
       3             :    SMB torture tester
       4             :    Copyright (C) Andrew Tridgell 1997-2003
       5             :    Copyright (C) Jelmer Vernooij 2006
       6             :    
       7             :    This program is free software; you can redistribute it and/or modify
       8             :    it under the terms of the GNU General Public License as published by
       9             :    the Free Software Foundation; either version 3 of the License, or
      10             :    (at your option) any later version.
      11             :    
      12             :    This program is distributed in the hope that it will be useful,
      13             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      14             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15             :    GNU General Public License for more details.
      16             :    
      17             :    You should have received a copy of the GNU General Public License
      18             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.
      19             : */
      20             : 
      21             : #include "includes.h"
      22             : #include "system/time.h"
      23             : #include "param/param.h"
      24             : #include "torture/smbtorture.h"
      25             : #include "lib/util/samba_modules.h"
      26             : 
      27             : _PUBLIC_ int torture_numops=10;
      28             : _PUBLIC_ int torture_entries=1000;
      29             : _PUBLIC_ int torture_failures=1;
      30             : _PUBLIC_ int torture_seed=0;
      31             : _PUBLIC_ int torture_numasync=100;
      32             : 
      33             : struct torture_suite *torture_root = NULL;
      34             : 
      35       58821 : bool torture_register_suite(TALLOC_CTX *mem_ctx, struct torture_suite *suite)
      36             : {
      37       58821 :         if (!suite)
      38           0 :                 return true;
      39             : 
      40       58821 :         if (torture_root == NULL)
      41        2355 :                 torture_root = talloc_zero(mem_ctx, struct torture_suite);
      42             : 
      43       58821 :         return torture_suite_add_suite(torture_root, suite);
      44             : }
      45             : 
      46        2355 : _PUBLIC_ int torture_init(TALLOC_CTX *mem_ctx)
      47             : {
      48             : #define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
      49             :         STATIC_smbtorture_MODULES_PROTO;
      50        2355 :         init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
      51        2355 :         init_module_fn *shared_init = load_samba_modules(mem_ctx, "smbtorture");
      52             : 
      53        2355 :         run_init_functions(mem_ctx, static_init);
      54        2355 :         run_init_functions(mem_ctx, shared_init);
      55             : 
      56        2355 :         talloc_free(shared_init);
      57             : 
      58        2355 :         return 0;
      59             : }

Generated by: LCOV version 1.13