2023-10-19 02:32:35 +03:00
/*
2006-03-25 17:49:00 +03:00
Unix SMB / CIFS implementation .
SMB torture UI functions
Copyright ( C ) Jelmer Vernooij 2006
2023-10-19 02:32:35 +03:00
2006-03-25 17:49:00 +03:00
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
2007-07-10 06:07:03 +04:00
the Free Software Foundation ; either version 3 of the License , or
2006-03-25 17:49:00 +03:00
( at your option ) any later version .
2023-10-19 02:32:35 +03:00
2006-03-25 17:49:00 +03:00
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 .
2023-10-19 02:32:35 +03:00
2006-03-25 17:49:00 +03:00
You should have received a copy of the GNU General Public License
2007-07-10 06:07:03 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2006-03-25 17:49:00 +03:00
*/
2006-06-17 02:06:09 +04:00
# ifndef __TORTURE_UI_H__
# define __TORTURE_UI_H__
2006-03-25 17:49:00 +03:00
struct torture_test ;
2006-06-17 02:06:09 +04:00
struct torture_context ;
2006-06-17 03:10:15 +04:00
struct torture_suite ;
2006-06-17 02:06:09 +04:00
struct torture_tcase ;
2008-11-01 02:24:55 +03:00
struct torture_results ;
2006-03-25 17:49:00 +03:00
2023-04-12 00:41:29 +03:00
/*
* Arranged in precedence order . TORTURE_ERROR has the highest priority ;
* TORTURE_OK the lowest .
*/
2023-10-19 02:32:35 +03:00
enum torture_result {
TORTURE_OK = 0 ,
2023-04-12 00:41:29 +03:00
TORTURE_SKIP = 1 ,
TORTURE_FAIL = 2 ,
TORTURE_ERROR = 3
2006-03-25 17:49:00 +03:00
} ;
2010-03-31 04:57:47 +04:00
enum torture_progress_whence {
TORTURE_PROGRESS_SET ,
TORTURE_PROGRESS_CUR ,
TORTURE_PROGRESS_POP ,
TORTURE_PROGRESS_PUSH ,
} ;
2023-10-19 02:32:35 +03:00
/*
* These callbacks should be implemented by any backend that wishes
2006-10-16 17:06:41 +04:00
* to listen to reports from the torture tests .
*/
2006-03-25 17:49:00 +03:00
struct torture_ui_ops
{
2008-11-01 02:24:55 +03:00
void ( * init ) ( struct torture_results * ) ;
2006-06-17 02:06:09 +04:00
void ( * comment ) ( struct torture_context * , const char * ) ;
2007-03-06 00:28:55 +03:00
void ( * warning ) ( struct torture_context * , const char * ) ;
2006-06-17 03:10:15 +04:00
void ( * suite_start ) ( struct torture_context * , struct torture_suite * ) ;
void ( * suite_finish ) ( struct torture_context * , struct torture_suite * ) ;
2023-10-19 02:32:35 +03:00
void ( * tcase_start ) ( struct torture_context * , struct torture_tcase * ) ;
2006-06-17 02:06:09 +04:00
void ( * tcase_finish ) ( struct torture_context * , struct torture_tcase * ) ;
2023-10-19 02:32:35 +03:00
void ( * test_start ) ( struct torture_context * ,
2006-06-17 02:06:09 +04:00
struct torture_tcase * ,
struct torture_test * ) ;
2023-10-19 02:32:35 +03:00
void ( * test_result ) ( struct torture_context * ,
2006-10-16 17:06:41 +04:00
enum torture_result , const char * reason ) ;
2010-03-31 04:57:47 +04:00
void ( * progress ) ( struct torture_context * , int offset , enum torture_progress_whence whence ) ;
2010-09-23 08:03:05 +04:00
void ( * report_time ) ( struct torture_context * ) ;
2006-03-25 17:49:00 +03:00
} ;
2006-10-17 00:05:19 +04:00
void torture_ui_test_start ( struct torture_context * context ,
struct torture_tcase * tcase ,
struct torture_test * test ) ;
void torture_ui_test_result ( struct torture_context * context ,
enum torture_result result ,
const char * comment ) ;
2010-09-23 08:03:05 +04:00
void torture_ui_report_time ( struct torture_context * context ) ;
2006-10-16 17:06:41 +04:00
/*
2023-10-19 02:32:35 +03:00
* Holds information about a specific run of the testsuite .
* The data in this structure should be considered private to
* the torture tests and should only be used directly by the torture
2006-10-16 17:06:41 +04:00
* code and the ui backends .
*
2023-10-19 02:32:35 +03:00
* Torture tests should instead call the torture_ * ( ) macros and functions
2006-10-16 17:06:41 +04:00
* specified below .
*/
2020-07-03 16:40:31 +03:00
struct torture_subunit_prefix {
const struct torture_subunit_prefix * parent ;
char subunit_prefix [ 256 ] ;
} ;
2006-03-25 17:49:00 +03:00
struct torture_context
{
2008-11-01 02:24:55 +03:00
struct torture_results * results ;
2006-03-25 21:45:51 +03:00
2006-06-17 02:06:09 +04:00
struct torture_test * active_test ;
struct torture_tcase * active_tcase ;
2020-07-03 16:40:31 +03:00
struct torture_subunit_prefix _initial_prefix ;
const struct torture_subunit_prefix * active_prefix ;
2006-06-17 02:06:09 +04:00
2006-06-17 04:17:50 +04:00
enum torture_result last_result ;
char * last_reason ;
2006-06-27 00:09:35 +04:00
2008-10-31 18:37:02 +03:00
/** Directory used for temporary test data */
2007-08-31 22:35:30 +04:00
const char * outputdir ;
2010-09-22 07:16:40 +04:00
2008-10-31 18:37:02 +03:00
/** Event context */
2008-12-29 22:24:57 +03:00
struct tevent_context * ev ;
2007-12-03 02:28:22 +03:00
2008-10-31 18:37:02 +03:00
/** Loadparm context (will go away in favor of torture_setting_ at some point) */
2007-12-03 02:28:22 +03:00
struct loadparm_context * lp_ctx ;
2017-08-29 12:15:11 +03:00
int conn_index ;
2006-10-16 17:06:41 +04:00
} ;
2008-11-01 02:24:55 +03:00
struct torture_results
{
const struct torture_ui_ops * ui_ops ;
void * ui_data ;
/** Whether tests should avoid writing output to stdout */
bool quiet ;
bool returncode ;
} ;
2023-10-19 02:32:35 +03:00
/*
2006-10-16 17:06:41 +04:00
* Describes a particular torture test
*/
struct torture_test {
2008-10-31 18:37:02 +03:00
/** Short unique name for the test. */
2006-10-16 17:06:41 +04:00
const char * name ;
2008-10-31 18:37:02 +03:00
/** Long description for the test. */
2006-10-16 17:06:41 +04:00
const char * description ;
2008-10-31 18:37:02 +03:00
2023-10-19 02:32:35 +03:00
/** Whether this is a dangerous test
2008-10-31 18:37:02 +03:00
* ( can corrupt the remote servers data or bring it down ) . */
2006-10-16 17:06:41 +04:00
bool dangerous ;
2008-10-31 18:37:02 +03:00
/** Function to call to run this test */
2023-10-19 02:32:35 +03:00
bool ( * run ) ( struct torture_context * torture_ctx ,
2006-10-16 17:06:41 +04:00
struct torture_tcase * tcase ,
struct torture_test * test ) ;
struct torture_test * prev , * next ;
2023-10-19 02:32:35 +03:00
/** Pointer to the actual test function. This is run by the
2008-10-31 18:37:02 +03:00
* run ( ) function above . */
2006-10-16 17:06:41 +04:00
void * fn ;
2008-10-31 18:37:02 +03:00
/** Use data for this test */
2006-10-16 17:06:41 +04:00
const void * data ;
2020-07-03 16:37:25 +03:00
struct torture_tcase * tcase ;
2006-10-16 17:06:41 +04:00
} ;
2023-10-19 02:32:35 +03:00
/*
2006-10-16 17:06:41 +04:00
* Describes a particular test case .
*/
struct torture_tcase {
const char * name ;
const char * description ;
bool ( * setup ) ( struct torture_context * tcase , void * * data ) ;
2023-10-19 02:32:35 +03:00
bool ( * teardown ) ( struct torture_context * tcase , void * data ) ;
2006-10-16 17:06:41 +04:00
bool fixture_persistent ;
void * data ;
struct torture_test * tests ;
struct torture_tcase * prev , * next ;
2020-07-03 16:37:25 +03:00
const struct torture_suite * suite ;
2006-03-25 17:49:00 +03:00
} ;
2006-05-22 22:59:29 +04:00
2006-06-17 02:06:09 +04:00
struct torture_suite
{
const char * name ;
const char * description ;
2006-10-16 17:06:41 +04:00
struct torture_tcase * testcases ;
struct torture_suite * children ;
2020-07-03 16:37:25 +03:00
const struct torture_suite * parent ;
2006-10-16 17:06:41 +04:00
/* Pointers to siblings of this torture suite */
struct torture_suite * prev , * next ;
2006-06-17 02:06:09 +04:00
} ;
2006-10-16 17:06:41 +04:00
/** Create a new torture suite */
2007-12-24 22:04:56 +03:00
struct torture_suite * torture_suite_create ( TALLOC_CTX * mem_ctx ,
const char * name ) ;
2006-10-16 17:06:41 +04:00
/** Change the setup and teardown functions for a testcase */
2007-12-24 22:04:56 +03:00
void torture_tcase_set_fixture ( struct torture_tcase * tcase ,
2006-10-16 17:06:41 +04:00
bool ( * setup ) ( struct torture_context * , void * * ) ,
bool ( * teardown ) ( struct torture_context * , void * ) ) ;
/* Add another test to run for a particular testcase */
2007-12-24 22:04:56 +03:00
struct torture_test * torture_tcase_add_test_const ( struct torture_tcase * tcase ,
const char * name ,
bool ( * run ) ( struct torture_context * test ,
const void * tcase_data , const void * test_data ) ,
2006-06-17 02:06:09 +04:00
const void * test_data ) ;
2006-10-16 17:06:41 +04:00
/* Add a testcase to a testsuite */
2007-12-24 22:04:56 +03:00
struct torture_tcase * torture_suite_add_tcase ( struct torture_suite * suite ,
2006-06-17 02:06:09 +04:00
const char * name ) ;
2006-10-16 17:06:41 +04:00
2007-12-24 22:04:56 +03:00
/* Convenience wrapper that adds a testcase against only one
2006-10-16 17:06:41 +04:00
* test will be run */
2007-12-24 22:04:56 +03:00
struct torture_tcase * torture_suite_add_simple_tcase_const (
struct torture_suite * suite ,
2006-06-17 02:06:09 +04:00
const char * name ,
2007-12-24 22:04:56 +03:00
bool ( * run ) ( struct torture_context * test ,
const void * test_data ) ,
2006-06-17 02:06:09 +04:00
const void * data ) ;
2007-12-24 22:04:56 +03:00
/* Convenience function that adds a test which only
2007-08-26 19:16:40 +04:00
* gets the test case data */
2007-12-24 22:04:56 +03:00
struct torture_test * torture_tcase_add_simple_test_const (
2007-08-26 19:16:40 +04:00
struct torture_tcase * tcase ,
const char * name ,
2007-12-24 22:04:56 +03:00
bool ( * run ) ( struct torture_context * test ,
const void * tcase_data ) ) ;
2007-08-26 19:16:40 +04:00
2007-12-24 22:04:56 +03:00
/* Convenience wrapper that adds a test that doesn't need any
2006-10-16 17:06:41 +04:00
* testcase data */
struct torture_tcase * torture_suite_add_simple_test (
2007-12-24 22:04:56 +03:00
struct torture_suite * suite ,
2006-10-16 17:06:41 +04:00
const char * name ,
bool ( * run ) ( struct torture_context * test ) ) ;
/* Add a child testsuite to an existing testsuite */
bool torture_suite_add_suite ( struct torture_suite * suite ,
2007-12-24 22:04:56 +03:00
struct torture_suite * child ) ;
2006-10-16 17:06:41 +04:00
2020-07-03 15:41:16 +03:00
char * torture_subunit_test_name ( struct torture_context * ctx ,
struct torture_tcase * tcase ,
struct torture_test * test ) ;
2020-07-03 16:40:31 +03:00
void torture_subunit_prefix_reset ( struct torture_context * ctx ,
const char * name ) ;
2020-07-03 15:41:16 +03:00
2006-10-16 17:06:41 +04:00
/* Run the specified testsuite recursively */
2007-12-24 22:04:56 +03:00
bool torture_run_suite ( struct torture_context * context ,
2006-06-17 02:06:09 +04:00
struct torture_suite * suite ) ;
2023-10-19 02:32:35 +03:00
/* Run the specified testsuite recursively, but only the specified
2010-04-10 23:24:33 +04:00
* tests */
2023-10-19 02:32:35 +03:00
bool torture_run_suite_restricted ( struct torture_context * context ,
2010-03-20 07:24:15 +03:00
struct torture_suite * suite , const char * * restricted ) ;
2010-04-10 23:24:33 +04:00
2006-10-16 17:06:41 +04:00
/* Run the specified testcase */
2007-12-24 22:04:56 +03:00
bool torture_run_tcase ( struct torture_context * context ,
2006-06-17 02:06:09 +04:00
struct torture_tcase * tcase ) ;
2023-10-19 02:32:35 +03:00
bool torture_run_tcase_restricted ( struct torture_context * context ,
2010-09-22 07:11:43 +04:00
struct torture_tcase * tcase , const char * * restricted ) ;
2006-10-16 17:06:41 +04:00
/* Run the specified test */
2007-12-24 22:04:56 +03:00
bool torture_run_test ( struct torture_context * context ,
2006-06-17 02:06:09 +04:00
struct torture_tcase * tcase ,
struct torture_test * test ) ;
2010-09-22 07:11:43 +04:00
bool torture_run_test_restricted ( struct torture_context * context ,
struct torture_tcase * tcase ,
struct torture_test * test ,
const char * * restricted ) ;
2006-10-16 17:06:41 +04:00
void torture_comment ( struct torture_context * test , const char * comment , . . . ) PRINTF_ATTRIBUTE ( 2 , 3 ) ;
2007-03-06 00:28:55 +03:00
void torture_warning ( struct torture_context * test , const char * comment , . . . ) PRINTF_ATTRIBUTE ( 2 , 3 ) ;
2007-12-24 22:04:56 +03:00
void torture_result ( struct torture_context * test ,
2006-10-17 23:06:50 +04:00
enum torture_result , const char * reason , . . . ) PRINTF_ATTRIBUTE ( 3 , 4 ) ;
2006-10-16 17:06:41 +04:00
2019-09-10 11:55:15 +03:00
# define torture_assert(torture_ctx,expr,cmt) do { \
2006-05-22 22:59:29 +04:00
if ( ! ( expr ) ) { \
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : Expression `%s' failed: %s " , __STRING ( expr ) , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
2019-09-10 11:55:15 +03:00
} \
} while ( 0 )
2006-05-22 22:59:29 +04:00
2022-04-14 02:25:26 +03:00
# define torture_assertf(torture_ctx, expr, format, ...) do { \
if ( ! ( expr ) ) { \
char * _msg = talloc_asprintf ( torture_ctx , \
format , \
__VA_ARGS__ ) ; \
torture_result ( torture_ctx , \
TORTURE_FAIL , \
__location__ " : Expression `%s' failed: %s " , \
__STRING ( expr ) , _msg ) ; \
talloc_free ( _msg ) ; \
return false ; \
} \
} while ( 0 )
2019-09-10 11:55:15 +03:00
# define torture_assert_goto(torture_ctx,expr,ret,label,cmt) do { \
2010-03-27 04:04:09 +03:00
if ( ! ( expr ) ) { \
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : Expression `%s' failed: %s " , __STRING ( expr ) , cmt ) ; \
ret = false ; \
goto label ; \
2019-09-10 11:55:15 +03:00
} \
} while ( 0 )
2010-03-27 04:04:09 +03:00
2006-10-16 17:06:41 +04:00
# define torture_assert_werr_equal(torture_ctx, got, expected, cmt) \
2006-06-26 23:23:21 +04:00
do { WERROR __got = got , __expected = expected ; \
if ( ! W_ERROR_EQUAL ( __got , __expected ) ) { \
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %s, expected %s: %s " , win_errstr ( __got ) , win_errstr ( __expected ) , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
2006-06-26 23:23:21 +04:00
} \
} while ( 0 )
2006-05-22 22:59:29 +04:00
2023-11-15 21:07:32 +03:00
# define torture_assert_werr_equal_goto(torture_ctx, got, expected, ret, label, cmt) \
do { WERROR __got = got , __expected = expected ; \
if ( ! W_ERROR_EQUAL ( __got , __expected ) ) { \
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %s, expected %s: %s " , win_errstr ( __got ) , win_errstr ( __expected ) , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_assert_ntstatus_equal(torture_ctx,got,expected,cmt) \
2006-06-26 23:23:21 +04:00
do { NTSTATUS __got = got , __expected = expected ; \
if ( ! NT_STATUS_EQUAL ( __got , __expected ) ) { \
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %s, expected %s: %s " , nt_errstr ( __got ) , nt_errstr ( __expected ) , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
2006-06-26 23:23:21 +04:00
} \
} while ( 0 )
2009-09-08 23:10:51 +04:00
# define torture_assert_ntstatus_equal_goto(torture_ctx,got,expected,ret,label,cmt) \
do { NTSTATUS __got = got , __expected = expected ; \
if ( ! NT_STATUS_EQUAL ( __got , __expected ) ) { \
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %s, expected %s: %s " , nt_errstr ( __got ) , nt_errstr ( __expected ) , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2007-11-09 21:24:51 +03:00
# define torture_assert_ndr_err_equal(torture_ctx,got,expected,cmt) \
do { enum ndr_err_code __got = got , __expected = expected ; \
if ( __got ! = __expected ) { \
2015-06-26 01:50:24 +03:00
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %d (%s), expected %d (%s): %s " , __got , ndr_errstr ( __got ) , __expected , __STRING ( expected ) , cmt ) ; \
2007-11-09 21:24:51 +03:00
return false ; \
} \
} while ( 0 )
2006-05-22 22:59:29 +04:00
2017-05-12 18:09:08 +03:00
# define torture_assert_ndr_err_equal_goto(torture_ctx,got,expected,ret,label,cmt) \
do { enum ndr_err_code __got = got , __expected = expected ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %d (%s), expected %d (%s): %s " , __got , ndr_errstr ( __got ) , __expected , __STRING ( expected ) , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2015-07-21 23:21:46 +03:00
# define torture_assert_hresult_equal(torture_ctx, got, expected, cmt) \
do { HRESULT __got = got , __expected = expected ; \
if ( ! HRES_IS_EQUAL ( __got , __expected ) ) { \
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %s, expected %s: %s " , hresult_errstr ( __got ) , hresult_errstr ( __expected ) , cmt ) ; \
return false ; \
} \
} while ( 0 )
2016-07-21 15:26:45 +03:00
# define torture_assert_krb5_error_equal(torture_ctx, got, expected, cmt) \
do { krb5_error_code __got = got , __expected = expected ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %d (%s), expected %d (%s): %s " , __got , error_message ( __got ) , __expected , error_message ( __expected ) , cmt ) ; \
return false ; \
} \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_assert_casestr_equal(torture_ctx,got,expected,cmt) \
do { const char * __got = ( got ) , * __expected = ( expected ) ; \
if ( ! strequal ( __got , __expected ) ) { \
2019-05-08 17:54:30 +03:00
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %s, expected %s: %s " , \
__got , __expected = = NULL ? " null " : __expected , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
2006-06-26 23:23:21 +04:00
} \
} while ( 0 )
2006-06-12 23:49:53 +04:00
2006-10-16 17:06:41 +04:00
# define torture_assert_str_equal(torture_ctx,got,expected,cmt)\
do { const char * __got = ( got ) , * __expected = ( expected ) ; \
if ( strcmp_safe ( __got , __expected ) ! = 0 ) { \
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , \
2019-05-08 17:54:30 +03:00
__location__ " : " # got " was %s, expected %s: %s " , \
__got , __expected = = NULL ? " NULL " : __expected , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
2006-06-26 23:23:21 +04:00
} \
} while ( 0 )
2006-06-12 23:49:53 +04:00
2010-12-15 19:44:23 +03:00
# define torture_assert_strn_equal(torture_ctx,got,expected,len,cmt)\
do { const char * __got = ( got ) , * __expected = ( expected ) ; \
if ( strncmp ( __got , __expected , len ) ! = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " %s of len %d did not match " # expected " %s: %s " , \
__got , ( int ) len , __expected , cmt ) ; \
return false ; \
} \
} while ( 0 )
2009-09-08 23:10:51 +04:00
# define torture_assert_str_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
do { const char * __got = ( got ) , * __expected = ( expected ) ; \
if ( strcmp_safe ( __got , __expected ) ! = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %s, expected %s: %s " , \
__got , __expected , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2008-04-13 23:31:06 +04:00
# define torture_assert_mem_equal(torture_ctx,got,expected,len,cmt)\
do { const void * __got = ( got ) , * __expected = ( expected ) ; \
if ( memcmp ( __got , __expected , len ) ! = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2009-06-02 14:18:59 +04:00
__location__ " : " # got " of len %d did not match " # expected " : %s " , ( int ) len , cmt ) ; \
2008-04-13 23:31:06 +04:00
return false ; \
} \
} while ( 0 )
2016-12-08 17:44:37 +03:00
# define torture_assert_mem_equal_goto(torture_ctx,got,expected,len,ret,label,cmt) \
do { const void * __got = ( got ) , * __expected = ( expected ) ; \
if ( memcmp ( __got , __expected , len ) ! = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " of len %d did not match " # expected " : %s " , ( int ) len , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2017-03-23 22:30:50 +03:00
# define torture_assert_mem_not_equal_goto(torture_ctx,got,expected,len,ret,label,cmt) \
do { const void * __got = ( got ) , * __expected = ( expected ) ; \
if ( memcmp ( __got , __expected , len ) = = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " of len %d unexpectedly matches " # expected " : %s " , ( int ) len , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2013-02-06 15:25:43 +04:00
static inline void torture_dump_data_str_cb ( const char * buf , void * private_data )
{
char * * dump = ( char * * ) private_data ;
* dump = talloc_strdup_append_buffer ( * dump , buf ) ;
}
2008-11-05 04:00:44 +03:00
# define torture_assert_data_blob_equal(torture_ctx,got,expected,cmt)\
do { const DATA_BLOB __got = ( got ) , __expected = ( expected ) ; \
if ( __got . length ! = __expected . length ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " .len %d did not match " # expected " len %d: %s " , \
( int ) __got . length , ( int ) __expected . length , cmt ) ; \
return false ; \
} \
if ( memcmp ( __got . data , __expected . data , __got . length ) ! = 0 ) { \
2013-02-06 15:25:43 +04:00
char * __dump = NULL ; \
uint8_t __byte_a = 0x00 ; \
uint8_t __byte_b = 0x00 ; \
2019-04-30 15:23:52 +03:00
size_t __i ; \
2013-02-06 15:25:43 +04:00
for ( __i = 0 ; __i < __expected . length ; __i + + ) { \
__byte_a = __expected . data [ __i ] ; \
if ( __i = = __got . length ) { \
__byte_b = 0x00 ; \
break ; \
} \
__byte_b = __got . data [ __i ] ; \
if ( __byte_a ! = __byte_b ) { \
break ; \
} \
} \
2019-04-30 15:23:52 +03:00
torture_warning ( torture_ctx , " blobs differ at byte 0x%02X (%zu) " , ( unsigned int ) __i , __i ) ; \
2013-02-06 15:25:43 +04:00
torture_warning ( torture_ctx , " expected byte[0x%02X] = 0x%02X got byte[0x%02X] = 0x%02X " , \
2019-04-30 15:23:52 +03:00
( unsigned int ) __i , __byte_a , ( unsigned int ) __i , __byte_b ) ; \
2013-02-06 15:25:43 +04:00
__dump = talloc_strdup ( torture_ctx , " " ) ; \
dump_data_cb ( __got . data , __got . length , true , \
torture_dump_data_str_cb , & __dump ) ; \
torture_warning ( torture_ctx , " got[0x%02X]: \n %s " , \
2019-04-30 15:23:52 +03:00
( unsigned int ) __got . length , __dump ) ; \
2013-02-06 15:25:43 +04:00
TALLOC_FREE ( __dump ) ; \
__dump = talloc_strdup ( torture_ctx , " " ) ; \
dump_data_cb ( __expected . data , __expected . length , true , \
torture_dump_data_str_cb , & __dump ) ; \
torture_warning ( torture_ctx , " expected[0x%02X]: \n %s " , \
( int ) __expected . length , __dump ) ; \
TALLOC_FREE ( __dump ) ; \
2008-11-05 04:00:44 +03:00
torture_result ( torture_ctx , TORTURE_FAIL , \
2009-06-02 14:18:59 +04:00
__location__ " : " # got " of len %d did not match " # expected " : %s " , ( int ) __got . length , cmt ) ; \
2008-11-05 04:00:44 +03:00
return false ; \
} \
} while ( 0 )
2007-08-11 21:08:22 +04:00
# define torture_assert_file_contains_text(torture_ctx,filename,expected,cmt)\
do { \
char * __got ; \
const char * __expected = ( expected ) ; \
size_t __size ; \
2008-10-12 21:46:38 +04:00
__got = file_load ( filename , & __size , 0 , torture_ctx ) ; \
2007-08-11 21:08:22 +04:00
if ( __got = = NULL ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : unable to open %s: %s \n " , \
filename , cmt ) ; \
return false ; \
} \
\
if ( strcmp_safe ( __got , __expected ) ! = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : %s contained: \n %sExpected: %s%s \n " , \
filename , __got , __expected , cmt ) ; \
talloc_free ( __got ) ; \
return false ; \
} \
talloc_free ( __got ) ; \
} while ( 0 )
2007-08-26 19:16:40 +04:00
# define torture_assert_file_contains(torture_ctx,filename,expected,cmt)\
do { const char * __got , * __expected = ( expected ) ; \
size_t __size ; \
2008-10-12 21:46:38 +04:00
__got = file_load ( filename , * size , 0 , torture_ctx ) ; \
2007-08-26 19:16:40 +04:00
if ( strcmp_safe ( __got , __expected ) ! = 0 ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : %s contained: \n %sExpected: %s%s \n " , \
__got , __expected , cmt ) ; \
talloc_free ( __got ) ; \
return false ; \
} \
talloc_free ( __got ) ; \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_assert_int_equal(torture_ctx,got,expected,cmt)\
do { int __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , \
2010-04-09 15:23:53 +04:00
__location__ " : " # got " was %d (0x%X), expected %d (0x%X): %s " , \
__got , __got , __expected , __expected , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
} \
} while ( 0 )
2024-04-05 04:22:11 +03:00
# define torture_assert_int_less(torture_ctx,got,limit,cmt)\
do { int __got = ( got ) , __limit = ( limit ) ; \
if ( __got > = __limit ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %d (0x%X), expected < %d (0x%X): %s " , \
__got , __got , __limit , __limit , cmt ) ; \
return false ; \
} \
} while ( 0 )
# define torture_assert_int_greater(torture_ctx,got,limit,cmt)\
do { int __got = ( got ) , __limit = ( limit ) ; \
if ( __got < = __limit ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %d (0x%X), expected > %d (0x%X): %s " , \
__got , __got , __limit , __limit , cmt ) ; \
return false ; \
} \
} while ( 0 )
2009-09-08 23:10:51 +04:00
# define torture_assert_int_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
do { int __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2010-04-09 15:23:53 +04:00
__location__ " : " # got " was %d (0x%X), expected %d (0x%X): %s " , \
__got , __got , __expected , __expected , cmt ) ; \
2009-09-08 23:10:51 +04:00
ret = false ; \
goto label ; \
} \
} while ( 0 )
2014-10-02 15:02:48 +04:00
# define torture_assert_int_not_equal(torture_ctx,got,not_expected,cmt)\
do { int __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %d (0x%X), expected a different number: %s " , \
__got , __got , cmt ) ; \
return false ; \
} \
} while ( 0 )
2015-03-27 12:02:28 +03:00
# define torture_assert_int_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
do { int __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %d (0x%X), expected a different number: %s " , \
__got , __got , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2019-04-16 17:46:43 +03:00
# define torture_assert_u32_equal(torture_ctx,got,expected,cmt)\
do { uint32_t __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu32 " (0x% " PRIX32 " ), expected % " PRIu32 " (0x% " PRIX32 " ): %s " , \
__got , __got , \
__expected , __expected , \
2019-04-16 17:46:43 +03:00
cmt ) ; \
return false ; \
} \
} while ( 0 )
# define torture_assert_u32_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
do { uint32_t __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu32 " (0x% " PRIX32 " ), expected % " PRIu32 " (0x% " PRIX32 " ): %s " , \
__got , __got , \
__expected , __expected , \
2019-04-16 17:46:43 +03:00
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
# define torture_assert_u32_not_equal(torture_ctx,got,not_expected,cmt)\
do { uint32_t __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu32 " (0x% " PRIX32 " ), expected a different number: %s " , \
__got , __got , \
2019-04-16 17:46:43 +03:00
cmt ) ; \
return false ; \
} \
} while ( 0 )
# define torture_assert_u32_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
do { uint32_t __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu32 " (0x% " PRIX32 " ), expected a different number: %s " , \
__got , __got , \
2019-04-16 17:46:43 +03:00
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2007-03-06 01:26:38 +03:00
# define torture_assert_u64_equal(torture_ctx,got,expected,cmt)\
do { uint64_t __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu64 " (0x% " PRIX64 " ), expected % " PRIu64 " (0x% " PRIX64 " ): %s " , \
__got , __got , \
__expected , __expected , \
2010-04-09 15:23:53 +04:00
cmt ) ; \
2007-03-06 01:26:38 +03:00
return false ; \
} \
} while ( 0 )
2010-11-22 14:38:41 +03:00
# define torture_assert_u64_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
do { uint64_t __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu64 " (0x% " PRIX64 " ), expected % " PRIu64 " (0x% " PRIX64 " ): %s " , \
__got , __got , \
__expected , __expected , \
2010-11-22 14:38:41 +03:00
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2014-10-02 15:03:05 +04:00
# define torture_assert_u64_not_equal(torture_ctx,got,not_expected,cmt)\
do { uint64_t __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu64 " (0x% " PRIX64 " ), expected a different number: %s " , \
__got , __got , \
2014-10-02 15:03:05 +04:00
cmt ) ; \
return false ; \
} \
} while ( 0 )
2016-02-24 21:23:21 +03:00
# define torture_assert_u64_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
do { uint64_t __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
2023-10-19 02:34:30 +03:00
__location__ " : " # got " was % " PRIu64 " (0x% " PRIX64 " ), expected a different number: %s " , \
__got , __got , \
2016-02-24 21:23:21 +03:00
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2023-10-19 02:34:53 +03:00
# define torture_assert_size_equal(torture_ctx,got,expected,cmt)\
do { size_t __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %zu (0x%zX), expected %zu (0x%zX): %s " , \
__got , __got , \
__expected , __expected , \
cmt ) ; \
return false ; \
} \
} while ( 0 )
# define torture_assert_size_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
do { size_t __got = ( got ) , __expected = ( expected ) ; \
if ( __got ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %zu (0x%zX), expected %zu (0x%zX): %s " , \
__got , __got , \
__expected , __expected , \
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
# define torture_assert_size_not_equal(torture_ctx,got,not_expected,cmt)\
do { size_t __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %zu (0x%zX), expected a different number: %s " , \
__got , __got , \
cmt ) ; \
return false ; \
} \
} while ( 0 )
# define torture_assert_size_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
do { size_t __got = ( got ) , __not_expected = ( not_expected ) ; \
if ( __got = = __not_expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %zu (0x%zX), expected a different number: %s " , \
__got , __got , \
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_assert_errno_equal(torture_ctx,expected,cmt)\
do { int __expected = ( expected ) ; \
if ( errno ! = __expected ) { \
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : errno was %d (%s), expected %d: %s: %s " , \
errno , strerror ( errno ) , __expected , \
strerror ( __expected ) , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
} \
} while ( 0 )
2019-04-23 17:47:45 +03:00
# define torture_assert_errno_equal_goto(torture_ctx,expected,ret,label,cmt)\
do { int __expected = ( expected ) ; \
if ( errno ! = __expected ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : errno was %d (%s), expected %d: %s: %s " , \
errno , strerror ( errno ) , __expected , \
strerror ( __expected ) , cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2011-11-03 14:33:16 +04:00
# define torture_assert_guid_equal(torture_ctx,got,expected,cmt)\
2016-11-18 12:51:57 +03:00
do { const struct GUID __got = ( got ) , __expected = ( expected ) ; \
2011-11-03 14:33:16 +04:00
if ( ! GUID_equal ( & __got , & __expected ) ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %s, expected %s: %s " , \
GUID_string ( torture_ctx , & __got ) , GUID_string ( torture_ctx , & __expected ) , cmt ) ; \
return false ; \
} \
} while ( 0 )
2010-12-21 18:14:20 +03:00
# define torture_assert_nttime_equal(torture_ctx,got,expected,cmt) \
do { NTTIME __got = got , __expected = expected ; \
if ( ! nt_time_equal ( & __got , & __expected ) ) { \
2022-11-29 14:07:19 +03:00
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : " # got " was %s, expected %s: %s " , nt_time_string ( torture_ctx , __got ) , nt_time_string ( torture_ctx , __expected ) , cmt ) ; \
2010-12-21 18:14:20 +03:00
return false ; \
} \
} while ( 0 )
2006-10-16 17:06:41 +04:00
2015-06-26 01:48:03 +03:00
# define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\
2016-11-18 12:51:57 +03:00
do { const struct dom_sid * __got = ( got ) , * __expected = ( expected ) ; \
2015-06-26 01:48:03 +03:00
if ( ! dom_sid_equal ( __got , __expected ) ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was %s, expected %s: %s " , \
dom_sid_string ( torture_ctx , __got ) , dom_sid_string ( torture_ctx , __expected ) , cmt ) ; \
return false ; \
} \
} while ( 0 )
2015-03-26 23:20:23 +03:00
# define torture_assert_not_null(torture_ctx,got,cmt)\
2016-11-18 12:51:57 +03:00
do { const void * __got = ( got ) ; \
2015-03-26 23:20:23 +03:00
if ( __got = = NULL ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was NULL, expected != NULL: %s " , \
cmt ) ; \
return false ; \
} \
} while ( 0 )
# define torture_assert_not_null_goto(torture_ctx,got,ret,label,cmt)\
2016-11-18 12:51:57 +03:00
do { const void * __got = ( got ) ; \
2015-03-26 23:20:23 +03:00
if ( __got = = NULL ) { \
torture_result ( torture_ctx , TORTURE_FAIL , \
__location__ " : " # got " was NULL, expected != NULL: %s " , \
cmt ) ; \
ret = false ; \
goto label ; \
} \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_skip(torture_ctx,cmt) do {\
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_SKIP , __location__ " : %s " , cmt ) ; \
2006-10-16 17:06:41 +04:00
return true ; \
} while ( 0 )
2009-09-08 23:10:51 +04:00
# define torture_skip_goto(torture_ctx,label,cmt) do {\
torture_result ( torture_ctx , TORTURE_SKIP , __location__ " : %s " , cmt ) ; \
goto label ; \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_fail(torture_ctx,cmt) do {\
2006-10-17 23:06:50 +04:00
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : %s " , cmt ) ; \
2006-10-16 17:06:41 +04:00
return false ; \
} while ( 0 )
2007-03-06 00:28:55 +03:00
# define torture_fail_goto(torture_ctx,label,cmt) do {\
torture_result ( torture_ctx , TORTURE_FAIL , __location__ " : %s " , cmt ) ; \
goto label ; \
} while ( 0 )
2006-10-16 17:06:41 +04:00
# define torture_out stderr
2006-06-12 23:49:53 +04:00
2006-05-22 22:59:29 +04:00
/* Convenience macros */
2006-10-16 17:06:41 +04:00
# define torture_assert_ntstatus_ok(torture_ctx,expr,cmt) \
torture_assert_ntstatus_equal ( torture_ctx , expr , NT_STATUS_OK , cmt )
2006-05-22 22:59:29 +04:00
2009-09-08 23:10:51 +04:00
# define torture_assert_ntstatus_ok_goto(torture_ctx,expr,ret,label,cmt) \
torture_assert_ntstatus_equal_goto ( torture_ctx , expr , NT_STATUS_OK , ret , label , cmt )
2006-10-16 17:06:41 +04:00
# define torture_assert_werr_ok(torture_ctx,expr,cmt) \
torture_assert_werr_equal ( torture_ctx , expr , WERR_OK , cmt )
2006-05-22 22:59:29 +04:00
2023-11-15 21:07:32 +03:00
# define torture_assert_werr_ok_goto(torture_ctx,expr,ret,label,cmt) \
torture_assert_werr_equal_goto ( torture_ctx , expr , WERR_OK , ret , label , cmt )
2007-11-09 21:24:51 +03:00
# define torture_assert_ndr_success(torture_ctx,expr,cmt) \
torture_assert_ndr_err_equal ( torture_ctx , expr , NDR_ERR_SUCCESS , cmt )
2017-05-12 18:09:08 +03:00
# define torture_assert_ndr_success_goto(torture_ctx,expr,ret,label,cmt) \
torture_assert_ndr_err_equal_goto ( torture_ctx , expr , NDR_ERR_SUCCESS , ret , label , cmt )
2015-07-21 23:21:46 +03:00
# define torture_assert_hresult_ok(torture_ctx,expr,cmt) \
torture_assert_hresult_equal ( torture_ctx , expr , HRES_ERROR ( 0 ) , cmt )
2006-10-16 17:06:41 +04:00
/* Getting settings */
const char * torture_setting_string ( struct torture_context * test , \
2023-10-19 02:32:35 +03:00
const char * name ,
2006-10-16 17:06:41 +04:00
const char * default_value ) ;
2006-05-22 22:59:29 +04:00
2023-10-19 02:32:35 +03:00
int torture_setting_int ( struct torture_context * test ,
const char * name ,
2006-10-16 17:06:41 +04:00
int default_value ) ;
2023-10-19 02:32:35 +03:00
double torture_setting_double ( struct torture_context * test ,
const char * name ,
2007-08-28 04:16:58 +04:00
double default_value ) ;
2023-10-19 02:32:35 +03:00
bool torture_setting_bool ( struct torture_context * test ,
const char * name ,
2006-10-16 17:06:41 +04:00
bool default_value ) ;
2006-06-17 02:06:09 +04:00
2023-10-19 02:32:35 +03:00
struct torture_suite * torture_find_suite ( struct torture_suite * parent ,
2006-10-17 03:09:15 +04:00
const char * name ) ;
2009-11-18 04:46:45 +03:00
unsigned long torture_setting_ulong ( struct torture_context * test ,
const char * name ,
unsigned long default_value ) ;
2023-10-19 02:32:35 +03:00
NTSTATUS torture_temp_dir ( struct torture_context * tctx ,
const char * prefix ,
2008-04-02 06:53:27 +04:00
char * * tempdir ) ;
2010-07-06 09:22:31 +04:00
NTSTATUS torture_deltree_outputdir ( struct torture_context * tctx ) ;
2008-04-02 06:53:27 +04:00
struct torture_test * torture_tcase_add_simple_test ( struct torture_tcase * tcase ,
const char * name ,
bool ( * run ) ( struct torture_context * test , void * tcase_data ) ) ;
2023-10-19 02:32:35 +03:00
bool torture_suite_init_tcase ( struct torture_suite * suite ,
struct torture_tcase * tcase ,
2008-04-02 06:53:27 +04:00
const char * name ) ;
2010-03-31 04:57:47 +04:00
int torture_suite_children_count ( const struct torture_suite * suite ) ;
2008-04-02 06:53:27 +04:00
2008-12-29 22:24:57 +03:00
struct torture_context * torture_context_init ( struct tevent_context * event_ctx , struct torture_results * results ) ;
2008-11-01 02:24:55 +03:00
struct torture_results * torture_results_init ( TALLOC_CTX * mem_ctx , const struct torture_ui_ops * ui_ops ) ;
2008-04-02 06:53:27 +04:00
2008-10-31 18:37:02 +03:00
struct torture_context * torture_context_child ( struct torture_context * tctx ) ;
2008-10-23 23:30:41 +04:00
extern const struct torture_ui_ops torture_subunit_ui_ops ;
2011-10-18 15:15:22 +04:00
extern const struct torture_ui_ops torture_simple_ui_ops ;
2008-10-23 23:30:41 +04:00
2006-06-17 02:06:09 +04:00
# endif /* __TORTURE_UI_H__ */