torproject / stem

Python controller library for Tor
https://stem.torproject.org/
GNU Lesser General Public License v3.0
257 stars 75 forks source link

Four tests fail on s390x #149

Open mcepl opened 7 months ago

mcepl commented 7 months ago

When running the test suite while packaging the package (both stem 1.8.2 and cepa 1.8.4 packages in fact) for openSUSE/Leap on s390x (big endian) the following tests failed: test_connections_ipv6, test_connections_ipv6_by_user, test_high_connection_count, and test_stop:

[  172s] ======================================================================
[  172s] FAIL: test_connections_ipv6
[  172s] ----------------------------------------------------------------------
[  172s] Traceback (most recent call last):
[  172s]   File "/usr/lib64/python3.6/unittest/mock.py", line 1183, in patched
[  172s]     return func(*args, **keywargs)
[  172s]   File "/home/abuild/rpmbuild/BUILD/cepa-1.8.4/test/unit/util/proc.py", line 274, in test_connections_ipv6
[  172s]     self.assertEqual(expected, proc.connections(pid = pid))
[  172s] AssertionError: Lists differ: [Conn[17 chars]ess='2a01:04f8:0190:514a:0000:0000:0000:0002',[311 chars]rue)] != [Conn[17 chars]ess='f804:012a:4a51:9001:0000:0000:0200:0000',[311 chars]rue)]
[  172s] 
[  172s] First differing element 0:
[  172s] Conne[16 chars]ess='2a01:04f8:0190:514a:0000:0000:0000:0002',[118 chars]True)
[  172s] Conne[16 chars]ess='f804:012a:4a51:9001:0000:0000:0200:0000',[118 chars]True)
[  172s] 
[  172s] Diff is 1347 characters long. Set self.maxDiff to None to see it.
[  172s] 
[  172s] ======================================================================
[  172s] FAIL: test_connections_ipv6_by_user
[  172s] ----------------------------------------------------------------------
[  172s] Traceback (most recent call last):
[  172s]   File "/usr/lib64/python3.6/unittest/mock.py", line 1183, in patched
[  172s]     return func(*args, **keywargs)
[  172s]   File "/home/abuild/rpmbuild/BUILD/cepa-1.8.4/test/unit/util/proc.py", line 303, in test_connections_ipv6_by_user
[  172s]     self.assertEqual(expected, proc.connections(user = 'me'))
[  172s] AssertionError: Lists differ: [Conn[37 chars]0000:0000:ffff:0509:9e4b', local_port=5222, re[486 chars]rue)] != [Conn[37 chars]0000:ffff:0000:4b9e:0905', local_port=5222, re[486 chars]rue)]
[  172s] 
[  172s] First differing element 0:
[  172s] Conne[36 chars]0000:0000:ffff:0509:9e4b', local_port=5222, re[99 chars]True)
[  172s] Conne[36 chars]0000:ffff:0000:4b9e:0905', local_port=5222, re[99 chars]True)
[  172s] 
[  172s] Diff is 2042 characters long. Set self.maxDiff to None to see it.
[  172s] 
[  172s] ======================================================================
[  172s] FAIL: test_high_connection_count
[  172s] ----------------------------------------------------------------------
[  172s] Traceback (most recent call last):
[  172s]   File "/usr/lib64/python3.6/unittest/mock.py", line 1183, in patched
[  172s]     return func(*args, **keywargs)
[  172s]   File "/home/abuild/rpmbuild/BUILD/cepa-1.8.4/test/unit/util/proc.py", line 345, in test_high_connection_count
[  172s]     self.assertEqual(expected, proc.connections(pid))
[  172s] AssertionError: Lists differ: [Conn[64 chars]ess='51.34.34.34', remote_port=8772, protocol=[294 chars]lse)] != [Conn[64 chars]ess='34.34.34.51', remote_port=8772, protocol=[294 chars]lse)]
[  172s] 
[  172s] First differing element 0:
[  172s] Conne[63 chars]ess='51.34.34.34', remote_port=8772, protocol=[16 chars]alse)
[  172s] Conne[63 chars]ess='34.34.34.51', remote_port=8772, protocol=[16 chars]alse)
[  172s] 
[  172s] Diff is 1358 characters long. Set self.maxDiff to None to see it.

and

[  175s] ======================================================================
[  175s] FAIL: test_stop
[  175s] ----------------------------------------------------------------------
[  175s] Traceback (most recent call last):
[  175s]   File "/home/abuild/rpmbuild/BUILD/cepa-1.8.4/test/unit/descriptor/reader.py", line 437, in test_stop
[  175s]     reader.stop()
[  175s]   File "/home/abuild/rpmbuild/BUILD/cepa-1.8.4/stem/descriptor/reader.py", line 415, in stop
[  175s]     self._reader_thread.join()
[  175s]   File "/usr/lib64/python3.6/threading.py", line 1056, in join
[  175s]     self._wait_for_tstate_lock()
[  175s]   File "/usr/lib64/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
[  175s]     elif lock.acquire(block, timeout):
[  175s]   File "/home/abuild/rpmbuild/BUILD/cepa-1.8.4/test/unit/descriptor/reader.py", line 430, in timeout_handler
[  175s]     self.fail()
[  175s] AssertionError: None

My first impression (at least for the networking failures) would be that there is something wrong with the packages expectation of little endianness.

Complete build log showing all packages used and steps leading to this issue.