[devel] Из-за настроек IPv6 в сборочнице возникакет ошибка
Evgeny Sinelnikov
sin на altlinux.org
Пт Ноя 3 05:06:53 MSK 2017
Здравствуйте,
Из-за настроек сети в сборочнице, с ошибкой Address family not
supported by protocol не отрабатывает вот такой тест:
#ifdef HAVE_IPV6
static void test_socket_getsockname6(void **state)
{
struct torture_address addr = {
.sa_socklen = sizeof(struct sockaddr_in),
};
int rc;
int s;
(void) state; /* unused */
s = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
if (s < 0) {
print_message ( "ERROR socket(AF_INET6, SOCK_STREAM,
IPPROTO_TCP) = %s\n", strerror(errno));
} else {
print_message ("OK socket(AF_INET6, SOCK_STREAM,
IPPROTO_TCP)\n");
}
assert_int_not_equal(s, -1);
rc = getsockname(s, &addr.sa.s, &addr.sa_socklen);
assert_return_code(rc, errno);
assert_int_equal(addr.sa.in6.sin6_family, AF_INET6);
}
#endif
У меня, в локальной хешере, этот тест отрабатывает. Как быть?
http://git.altlinux.org/tasks/193039/build/100/x86_64/log
5: Test command:
/usr/src/RPM/BUILD/socket_wrapper-1.1.8/obj/tests/test_echo_tcp_socket
5: Environment variables:
5: LD_PRELOAD=/usr/src/RPM/BUILD/socket_wrapper-1.1.8/obj/src/libsocket_wrapper.so
5: Test timeout computed to be: 1500
5: [==========] Running 2 test(s).
5: [ RUN ] test_socket_getsockname
5: [ OK ] test_socket_getsockname
5: [ RUN ] test_socket_getsockname6
5: ERROR socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP) = Address family
not supported by protocol
5: [ ERROR ] --- 0xffffffffffffffff == 0xffffffffffffffff
5: [ LINE ] ---
/usr/src/RPM/BUILD/socket_wrapper-1.1.8/tests/test_echo_tcp_socket.c:54:
error: Failure!
5: [ FAILED ] test_socket_getsockname6
5: [==========] 2 test(s) run.
5: [ PASSED ] 1 test(s).
5: [ FAILED ] 1 test(s), listed below:
5: [ FAILED ] test_socket_getsockname6
5:
5: 1 FAILED TEST(S)
5/19 Test #5: test_echo_tcp_socket ...............***Failed 0.00 sec
test 6
Start 6: test_echo_tcp_connect
--
Sin (Sinelnikov Evgeny)
Подробная информация о списке рассылки Devel