Skip to content

Commit

Permalink
fixup! tests: provide gnrc_sock_udp tests
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
miri64 committed Oct 4, 2016
1 parent ab360d3 commit 779ff21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 1 addition & 11 deletions tests/gnrc_sock_udp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ static void test_sock_udp_recv__socketed(void)
.family = AF_INET6,
.port = _TEST_PORT_REMOTE };

dst_addr.u8[15] += 8;

assert(0 == sock_udp_create(&_sock, &local, &remote, SOCK_FLAGS_REUSE_EP));
assert(_inject_packet(&src_addr, &dst_addr, _TEST_PORT_REMOTE,
_TEST_PORT_LOCAL, "ABCD", sizeof("ABCD"),
Expand All @@ -255,8 +253,6 @@ static void test_sock_udp_recv__socketed_with_remote(void)
.port = _TEST_PORT_REMOTE };
sock_udp_ep_t result;

dst_addr.u8[15] += 8;

assert(0 == sock_udp_create(&_sock, &local, &remote, SOCK_FLAGS_REUSE_EP));
assert(_inject_packet(&src_addr, &dst_addr, _TEST_PORT_REMOTE,
_TEST_PORT_LOCAL, "ABCD", sizeof("ABCD"),
Expand All @@ -278,8 +274,6 @@ static void test_sock_udp_recv__unsocketed(void)
.family = AF_INET6,
.port = _TEST_PORT_LOCAL };

dst_addr.u8[15] += 8;

assert(0 == sock_udp_create(&_sock, &local, NULL, SOCK_FLAGS_REUSE_EP));
assert(_inject_packet(&src_addr, &dst_addr, _TEST_PORT_REMOTE,
_TEST_PORT_LOCAL, "ABCD", sizeof("ABCD"),
Expand All @@ -297,8 +291,6 @@ static void test_sock_udp_recv__unsocketed_with_remote(void)
.port = _TEST_PORT_LOCAL };
sock_udp_ep_t result;

dst_addr.u8[15] += 8;

assert(0 == sock_udp_create(&_sock, &local, NULL, SOCK_FLAGS_REUSE_EP));
assert(_inject_packet(&src_addr, &dst_addr, _TEST_PORT_REMOTE,
_TEST_PORT_LOCAL, "ABCD", sizeof("ABCD"),
Expand All @@ -320,8 +312,6 @@ static void test_sock_udp_recv__with_timeout(void)
.port = _TEST_PORT_LOCAL };
sock_udp_ep_t result;

dst_addr.u8[15] += 8;

assert(0 == sock_udp_create(&_sock, &local, NULL, SOCK_FLAGS_REUSE_EP));
assert(_inject_packet(&src_addr, &dst_addr, _TEST_PORT_REMOTE,
_TEST_PORT_LOCAL, "ABCD", sizeof("ABCD"),
Expand All @@ -343,7 +333,7 @@ static void test_sock_udp_send__AFNOSUPPORT(void)
.port = _TEST_PORT_REMOTE };

assert(-EAFNOSUPPORT == sock_udp_send(NULL, "ABCD", sizeof("ABCD"),
&remote));
&remote));
assert(_check_net());
}

Expand Down
1 change: 0 additions & 1 deletion tests/gnrc_sock_udp/stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "stack.h"

#define _MSG_QUEUE_SIZE (4)
#define _TEST_BUFFER_SIZE (128)

static msg_t _msg_queue[_MSG_QUEUE_SIZE];
static gnrc_netreg_entry_t _udp_handler;
Expand Down

0 comments on commit 779ff21

Please sign in to comment.