summaryrefslogtreecommitdiff
path: root/source4/torture/local
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-23 21:05:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:30 -0500
commitcb93d28e7c06fc8a95f9fda69fc2a9705120b10a (patch)
treea54de3572458db4801241a97bd67cb8c86f582db /source4/torture/local
parent240ec86942c6efad5da9b762075971f66969b2f4 (diff)
downloadsamba-cb93d28e7c06fc8a95f9fda69fc2a9705120b10a.tar.gz
samba-cb93d28e7c06fc8a95f9fda69fc2a9705120b10a.tar.bz2
samba-cb93d28e7c06fc8a95f9fda69fc2a9705120b10a.zip
r16489: Because the torture/ui.h file isn't automaticly generated, the
prototypes in it need to use the PRINTF_ATTRIBUTE() macro, rather than _PRINTF_ATTRIBUTE() (which becomes PRINTF_ATTRIBUTE() only in proto files, but not C files). This found a number of missing descriptions in the LOCAL-SOCKET test. Andrew Bartlett (This used to be commit 1009d55c8caa173e9998b38235c06b4ae4b30d80)
Diffstat (limited to 'source4/torture/local')
-rw-r--r--source4/torture/local/socket.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source4/torture/local/socket.c b/source4/torture/local/socket.c
index 67728ab69b..10dfd75ece 100644
--- a/source4/torture/local/socket.c
+++ b/source4/torture/local/socket.c
@@ -41,11 +41,11 @@ static BOOL test_udp(struct torture_context *test, const void *data)
BOOL ret = True;
status = socket_create("ip", SOCKET_TYPE_DGRAM, &sock1, 0);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "creating DGRAM IP socket 1");
talloc_steal(test, sock1);
status = socket_create("ip", SOCKET_TYPE_DGRAM, &sock2, 0);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "creating DGRAM IP socket 1");
talloc_steal(test, sock2);
localhost = socket_address_from_strings(sock1, sock1->backend_name,
@@ -54,7 +54,7 @@ static BOOL test_udp(struct torture_context *test, const void *data)
torture_assert(test, localhost, "Localhost not found");
status = socket_listen(sock1, localhost, 0, 0);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "listen on socket 1")
srv_addr = socket_get_my_addr(sock1, test);
if (srv_addr == NULL || strcmp(srv_addr->addr, iface_best_ip("127.0.0.1")) != 0) {
@@ -71,11 +71,11 @@ static BOOL test_udp(struct torture_context *test, const void *data)
sent = size;
status = socket_sendto(sock2, &blob, &sent, srv_addr);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "sendto() on socket 2");
status = socket_recvfrom(sock1, blob2.data, size, &nread,
sock1, &from_addr);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "recvfrom() on socket 1");
if (strcmp(from_addr->addr, srv_addr->addr) != 0) {
torture_fail(test, "Unexpected recvfrom addr %s", from_addr->addr);
@@ -92,11 +92,11 @@ static BOOL test_udp(struct torture_context *test, const void *data)
generate_random_buffer(blob.data, blob.length);
status = socket_sendto(sock1, &blob, &sent, from_addr);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "sendto() on socket 1");
status = socket_recvfrom(sock2, blob2.data, size, &nread,
sock2, &from_addr);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "recvfrom() on socket 2");
if (strcmp(from_addr->addr, srv_addr->addr) != 0) {
torture_fail(test, "Unexpected recvfrom addr %s\n", from_addr->addr);
return False;
@@ -137,11 +137,11 @@ static BOOL test_tcp(struct torture_context *test, const void *data)
struct event_context *ev = event_context_init(test);
status = socket_create("ip", SOCKET_TYPE_STREAM, &sock1, 0);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "creating IP stream socket 1");
talloc_steal(test, sock1);
status = socket_create("ip", SOCKET_TYPE_STREAM, &sock2, 0);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "creating IP stream socket 1");
talloc_steal(test, sock2);
localhost = socket_address_from_strings(sock1, sock1->backend_name,
@@ -149,7 +149,7 @@ static BOOL test_tcp(struct torture_context *test, const void *data)
torture_assert(test, localhost, "Localhost not found");
status = socket_listen(sock1, localhost, 0, 0);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "listen on socket 1");
srv_addr = socket_get_my_addr(sock1, test);
torture_assert(test, srv_addr && srv_addr->addr,
@@ -164,10 +164,10 @@ static BOOL test_tcp(struct torture_context *test, const void *data)
torture_comment(test, "server port is %d", srv_addr->port);
status = socket_connect_ev(sock2, NULL, srv_addr, 0, ev);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "connect() on socket 2")
status = socket_accept(sock1, &sock3);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "accept() on socket 1");
talloc_steal(test, sock3);
talloc_free(sock1);
@@ -177,10 +177,10 @@ static BOOL test_tcp(struct torture_context *test, const void *data)
sent = size;
status = socket_send(sock2, &blob, &sent);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "send() on socket 2");
status = socket_recv(sock3, blob2.data, size, &nread);
- torture_assert_ntstatus_ok(test, status, NULL);
+ torture_assert_ntstatus_ok(test, status, "recv() on socket 3");
from_addr = socket_get_peer_addr(sock3, test);