diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-21 22:54:46 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-07-03 17:29:05 +0000 |
commit | 1f82d0aecfa30884426fdcf583b32826527c639c (patch) | |
tree | 99e11e2aeb9b73a5e98c66f49d3da4ab97466519 /tests/socket | |
parent | 4aaa8abcab71a7257e20c96aa03d4f675b29c57e (diff) |
osmo_sock_get_name(): clearly indicate local and remote
In a string like
127.0.0.1:2905<->127.0.0.1:60661
it is hard to tell which is the local part. I'd have expected it on the left,
but it is actually on the right.
To avoid doubt and bypass bikesheds on which side should be what, clearly mark
the two sides as remote and local.
(r=127.0.0.1:2905<->l=127.0.0.1:60661)
Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8
Diffstat (limited to 'tests/socket')
-rw-r--r-- | tests/socket/socket_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c index b56d50c0..11ef8da4 100644 --- a/tests/socket/socket_test.c +++ b/tests/socket/socket_test.c @@ -49,7 +49,7 @@ static int test_sockinit(void) * as apparently that won't work on FreeBSD if there's only one * address (e.g. 127.0.0.1) assigned to the entire system, like * the Osmocom FreeBSD build slaves */ - OSMO_ASSERT(!strncmp(name, "(NULL<->", 7)); + OSMO_ASSERT(!strncmp(name, "(r=NULL<->", 9)); talloc_free(name); /* expect it to be blocking */ rc = fcntl(fd, F_GETFL); @@ -87,7 +87,7 @@ static int test_sockinit2(void) * as apparently that won't work on FreeBSD if there's only one * address (e.g. 127.0.0.1) assigned to the entire system, like * the Osmocom FreeBSD build slaves */ - OSMO_ASSERT(!strncmp(name, "(NULL<->", 7)); + OSMO_ASSERT(!strncmp(name, "(r=NULL<->", 9)); talloc_free(name); /* expect it to be blocking */ rc = fcntl(fd, F_GETFL); @@ -116,7 +116,7 @@ static int test_sockinit2(void) /* For some reason, on the jenkins.osmocom.org build slave with * FreeBSD 10 inside a jail, it fails. Works fine on laforge's * FreeBSD 10 or 11 VM at home */ - OSMO_ASSERT(!strncmp(name, "(127.0.0.1:53<->127.0.0.1", 25)); + OSMO_ASSERT(!strncmp(name, "(r=127.0.0.1:53<->l=127.0.0.1", 29)); #endif talloc_free(name); |