[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread Fomalhaut Weisszwerg

Fomalhaut Weisszwerg <weisszw...@gmail.com> added the comment:

STINNER Victor

Thank you for your info.

And this issue occurs not only ppc64le but also x86_64.
`uname -a` on my CentOS returns following:

Linux localhost.localdomain 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 
20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I think that this issue does not depend on arch.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31705>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread Fomalhaut Weisszwerg

Fomalhaut Weisszwerg <weisszw...@gmail.com> added the comment:

I've got the same error on CentOS 7.4 on x86_64.

---
$ cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
$ uname -a
Linux localhost.localdomain 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 
20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ strace -V
strace -- version 4.20
Copyright (c) 1991-2017 The strace developers <https://strace.io>.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Optional features enabled: (none)
$ cd Python-3.7.0a2
$ strace -v -s 128 -e trace=%network -o strace_py3_7_0a2_test_sha256.log 
./python -m test -v test_socket -m test_sha256
== CPython 3.7.0a2 (default, Nov 28 2017, 16:16:49) [GCC 6.4.0]
== Linux-3.10.0-693.5.2.el7.x86_64-x86_64-with-centos-7.4.1708-Core 
little-endian
== cwd: /home/vagrant/sources/Python-3.7.0a2/build/test_python_10627
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.00 [1/1] test_socket
test_sha256 (test.test_socket.LinuxKernelCryptoAPI) ... ERROR

==
ERROR: test_sha256 (test.test_socket.LinuxKernelCryptoAPI)
--
Traceback (most recent call last):
  File "/home/vagrant/sources/Python-3.7.0a2/Lib/test/test_socket.py", line 
5580, in test_sha256
op.sendall(b"abc")
OSError: [Errno 126] Required key not available

--
Ran 1 test in 0.006s

FAILED (errors=1)
test test_socket failed
test_socket failed

1 test failed:
test_socket

Total duration: 98 ms
Tests result: FAILURE
$ cat strace_py3_7_0a2_test_sha256.log 
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", 
_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=10628, si_uid=501, 
si_status=0, si_utime=0, si_stime=0} ---
socket(AF_CAN, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
socket(AF_CAN, SOCK_DGRAM|SOCK_CLOEXEC, 6) = -1 EPROTONOSUPPORT (Protocol not 
supported)
socket(AF_RDS, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = -1 EAFNOSUPPORT (Address 
family not supported by protocol)
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
bind(3, {sa_family=AF_ALG, 
sa_data="hash\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0sha256\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
 88) = 0
accept4(3, NULL, NULL, SOCK_CLOEXEC)= 4
sendto(4, "abc", 3, 0, NULL, 0) = -1 ENOKEY (Required key not available)
+++ exited with 2 +++
---


By contrast, I can get a expected result on Debian:

---
$ uname -a
Linux debian-server 4.13.0-1-amd64 #1 SMP Debian 4.13.13-1 (2017-11-16) x86_64 
GNU/Linux
$ cd Python-3.7.0a2
$ strace -v -s 128 -e trace=%network -o strace.log ./python -m test -v 
test_socket -m test_sha256
== CPython 3.7.0a2 (default, Nov 29 2017, 18:47:33) [GCC 7.2.0]
== Linux-4.13.0-1-amd64-x86_64-with-debian-buster-sid little-endian
== cwd: /home/working/Python-3.7.0a2/build/test_python_21000
== CPU count: 24
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.07 [1/1] test_socket
test_sha256 (test.test_socket.LinuxKernelCryptoAPI) ... ok

--
Ran 1 test in 0.001s

OK
1 test OK.

Total duration: 43 ms
Tests result: SUCCESS
$ cat strace.log
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", 
_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21041, si_uid=1000, 
si_status=0, si_utime=0, si_stime=0} ---
socket(AF_CAN, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
socket(AF_CAN, SOCK_DGRAM|SOCK_CLOEXEC, 6) = -1 EPROTONOSUPPORT (Protocol not 
supported)
socket(AF_RDS, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = -1 EAFNOSUPPORT (Address 
family not supported by protocol)
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INE