From: Zbigniew Jędrzejewski-Szmek Date: Sat, 5 Sep 2020 14:55:10 +0000 (+0200) Subject: test-in-addr-util: add log headers X-Git-Tag: v247-rc1~261^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38c30b35f38298c2fbdcee46bb39aed3baa3019c;p=thirdparty%2Fsystemd.git test-in-addr-util: add log headers --- diff --git a/src/test/test-in-addr-util.c b/src/test/test-in-addr-util.c index 63e9800ec8d..a9ecd0627bf 100644 --- a/src/test/test-in-addr-util.c +++ b/src/test/test-in-addr-util.c @@ -58,6 +58,8 @@ static void test_in_addr_prefix_from_string_one( } static void test_in_addr_prefix_from_string(void) { + log_info("/* %s */", __func__); + test_in_addr_prefix_from_string_one("", AF_INET, -EINVAL, NULL, 0, -EINVAL, 0, -EINVAL, 0); test_in_addr_prefix_from_string_one("/", AF_INET, -EINVAL, NULL, 0, -EINVAL, 0, -EINVAL, 0); test_in_addr_prefix_from_string_one("/8", AF_INET, -EINVAL, NULL, 0, -EINVAL, 0, -EINVAL, 0); @@ -90,7 +92,7 @@ static void test_in_addr_prefix_to_string_valid(int family, const char *p) { union in_addr_union u; unsigned char l; - log_info("/* %s */", p); + log_info("%s: %s", __func__, p); assert_se(in_addr_prefix_from_string(p, family, &u, &l) >= 0); assert_se(in_addr_prefix_to_string(family, &u, l, &str) >= 0); @@ -102,7 +104,7 @@ static void test_in_addr_prefix_to_string_unoptimized(int family, const char *p) union in_addr_union u1, u2; unsigned char len1, len2; - log_info("/* %s */", p); + log_info("%s: %s", __func__, p); assert_se(in_addr_prefix_from_string(p, family, &u1, &len1) >= 0); assert_se(in_addr_prefix_to_string(family, &u1, len1, &str1) >= 0); @@ -115,6 +117,8 @@ static void test_in_addr_prefix_to_string_unoptimized(int family, const char *p) } static void test_in_addr_prefix_to_string(void) { + log_info("/* %s */", __func__); + test_in_addr_prefix_to_string_valid(AF_INET, "0.0.0.0/32"); test_in_addr_prefix_to_string_valid(AF_INET, "1.2.3.4/0"); test_in_addr_prefix_to_string_valid(AF_INET, "1.2.3.4/24"); @@ -137,6 +141,8 @@ static void test_in_addr_random_prefix(void) { _cleanup_free_ char *str = NULL; union in_addr_union a; + log_info("/* %s */", __func__); + assert_se(in_addr_from_string(AF_INET, "192.168.10.1", &a) >= 0); assert_se(in_addr_random_prefix(AF_INET, &a, 31, 32) >= 0); diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index 0bc713cb532..d0dda379512 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -504,17 +504,11 @@ int main(int argc, char *argv[]) { test_setup_logging(LOG_DEBUG); test_ifname_valid(); - test_socket_print_unix(); - test_sockaddr_equal(); - test_sockaddr_un_len(); - test_in_addr_is_multicast(); - test_getpeercred_getpeergroups(); - test_passfd_read(); test_passfd_contents_read(); test_receive_nopassfd();