From 920c1ca95c499194430a18a9f2186670c6861cc4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 17 Jun 2006 00:17:50 +0000 Subject: r16328: Wrap all existing tests in simple single-function testsuites. (This used to be commit 7e811adf59841936b7e634fca4e95630f890c5af) --- source4/torture/local/socket.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source4/torture/local/socket.c') diff --git a/source4/torture/local/socket.c b/source4/torture/local/socket.c index 47fb98f96c..67728ab69b 100644 --- a/source4/torture/local/socket.c +++ b/source4/torture/local/socket.c @@ -26,7 +26,6 @@ #include "system/network.h" #include "netif/netif.h" #include "torture/torture.h" -#include "torture/ui.h" /* basic testing of udp routines @@ -135,7 +134,6 @@ static BOOL test_tcp(struct torture_context *test, const void *data) size_t size = 100 + (random() % 100); DATA_BLOB blob, blob2; size_t sent, nread; - BOOL ret = True; struct event_context *ev = event_context_init(test); status = socket_create("ip", SOCKET_TYPE_STREAM, &sock1, 0); @@ -207,13 +205,13 @@ static BOOL test_tcp(struct torture_context *test, const void *data) return True; } -BOOL torture_local_socket(struct torture_context *torture) +struct torture_suite *torture_local_socket(TALLOC_CTX *mem_ctx) { - struct torture_suite *suite = torture_suite_create(torture, + struct torture_suite *suite = torture_suite_create(mem_ctx, "LOCAL-SOCKET"); torture_suite_add_simple_tcase(suite, "udp", test_udp, NULL); torture_suite_add_simple_tcase(suite, "tcp", test_tcp, NULL); - return torture_run_suite(torture, suite); + return suite; } -- cgit