struct torture_suite *torture_local_event(TALLOC_CTX *mem_ctx) { struct torture_suite *suite = torture_suite_create(mem_ctx, "event"); const char **list = tevent_backend_list(suite); int i; for (i=0;list && list[i];i++) { struct torture_suite *backend_suite; backend_suite = torture_suite_create(mem_ctx, list[i]); torture_suite_add_simple_tcase_const(backend_suite, "context", test_event_context, (const void *)list[i]); torture_suite_add_simple_tcase_const(backend_suite, "fd1", test_event_fd1, (const void *)list[i]); torture_suite_add_simple_tcase_const(backend_suite, "fd2", test_event_fd2, (const void *)list[i]); torture_suite_add_suite(suite, backend_suite); } #ifdef HAVE_PTHREAD torture_suite_add_simple_tcase_const(suite, "threaded_poll_mt", test_event_context_threaded, NULL); #endif return suite; }
struct torture_suite *torture_local_dbspeed(TALLOC_CTX *mem_ctx) { struct torture_suite *s = torture_suite_create(mem_ctx, "DBSPEED"); torture_suite_add_simple_tcase_const(s, "tdb_speed", test_tdb_speed, NULL); torture_suite_add_simple_tcase_const(s, "ldb_speed", test_ldb_speed, NULL); return s; }
static struct torture_tcase *add_test(struct torture_suite *suite, uint32_t bindoptions, bool keyexchange, bool ntlm2, bool lm_key) { char *name = NULL; struct secret_settings *settings; settings = talloc_zero(suite, struct secret_settings); settings->bindoptions = bindoptions; if (bindoptions == DCERPC_PUSH_BIGENDIAN) name = talloc_strdup(suite, "bigendian"); else if (bindoptions == DCERPC_SEAL) name = talloc_strdup(suite, "seal"); else if (bindoptions == 0) name = talloc_strdup(suite, "none"); else name = talloc_strdup(suite, "unknown"); name = talloc_asprintf_append_buffer(name, " keyexchange:%s", keyexchange?"yes":"no"); settings->keyexchange = keyexchange; name = talloc_asprintf_append_buffer(name, " ntlm2:%s", ntlm2?"yes":"no"); settings->ntlm2 = ntlm2; name = talloc_asprintf_append_buffer(name, " lm_key:%s", lm_key?"yes":"no"); settings->lm_key = lm_key; return torture_suite_add_simple_tcase_const(suite, name, test_secrets, settings); }
static void test_bind_op(struct torture_suite *suite, const char *name, uint32_t flags) { uint32_t *flags_p = talloc(suite, uint32_t); *flags_p = flags; torture_suite_add_simple_tcase_const(suite, name, test_bind, flags_p); }
/* test a set of example SDDL strings */ struct torture_suite *torture_local_sddl(TALLOC_CTX *mem_ctx) { struct torture_suite *suite = torture_suite_create(mem_ctx, "SDDL"); int i; for (i = 0; i < ARRAY_SIZE(examples); i++) { torture_suite_add_simple_tcase_const(suite, talloc_asprintf(suite, "%d", i), test_sddl, examples[i]); } return suite; }
struct torture_suite *torture_local_binding_string(TALLOC_CTX *mem_ctx) { int i; struct torture_suite *suite = torture_suite_create(mem_ctx, "binding"); for (i = 0; i < ARRAY_SIZE(test_strings); i++) { torture_suite_add_simple_tcase_const(suite, test_strings[i], test_BindingString, test_strings[i]); } torture_suite_add_simple_test(suite, "no transport",test_no_transport); torture_suite_add_simple_test(suite, "parsing results", test_parse_check_results); return suite; }