Closed mambelli closed 2 years ago
Only the lib/fork.py
timeout is left to solve.
After skipping the epoll test that was timing out, there is another fork error:
[rami_l@fermicloud490 work39]$ cat output/gwms.LOCAL.pyunittest.d/gwms.LOCAL.pyunittest.d.test_lib_fork.txt
Running tests...
----------------------------------------------------------------------
..E...S......
======================================================================
ERROR [10.008s]: test_fetch_ready_fork_result_list (__main__.TestFetchReadyForkResultList)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rami_l/work39/glideinwms/unittests/./test_lib_fork.py", line 116, in test_fetch_ready_fork_result_list
result = fetch_ready_fork_result_list(pipe_ids)
File "/home/rami_l/work39/glideinwms/lib/fork.py", line 267, in fetch_ready_fork_result_list
poll_obj.unregister(fd) # Is this needed? the poll object is no more used, next time will be a new one
OSError: [Errno 9] Bad file descriptor
----------------------------------------------------------------------
Ran 13 tests in 61.548s
FAILED (errors=1, skipped=1)
Generating XML reports...
Fork error after skipping epoll solved changed the key for range to i
[rami_l@fermicloud490 work39]$
for key in range(1, 5): pipe_ids[key] = fork_in_bg(sleep_fn, svl) expected[key] = str(svl) for i in range(1, 5): pipe_ids[i] = fork_in_bg(sleep_fn, svl) expected[i] = str(svl)
result = fetch_fork_result_list(pipe_ids)
self.assertTrue(expected, result)
@@ -109,11 +109,11 @@ def test_fetch_ready_fork_result_list(self): pipe_ids = {} expected = {} svl = 10 for key in range(1, 5): pipe_ids[key] = fork_in_bg(sleep_fn, svl) expected[key] = str(svl) for i in range(1, 5): pipe_ids[i] = fork_in_bg(sleep_fn, svl) expected[i] = str(svl)
**result = fetch_ready_fork_result_list(pipe_ids)**
reviewing source: https://docs.python.org/3/library/select.html to fix skipped epoll test
The epoll problem was fixed in #193
Describe the bug Unit tests are failing on ALma8 with python3.9.
The installation of
python39-cryptography
fixed some tests that were failing withModuleNotFoundError: No module named 'cryptography'
. The RPM dependencies should probably target a specific python version.At times also
test_lib_symCrypto.py
seems to fail, triggered by the changes in branchissue_155_2
but not all the time, and showing errors due to encoding and seemingly not related to the changes in the branch. So I'm adding it here even if have not observed that problem in the master branch:To Reproduce Install OSG 3.5 and the vofrontend (and dependencies) on a Alma8 host (I used Fermicloud). Install also
yum install python39-cryptography
to avoid those errors. And run the unit testsExpected behavior All tests should be successful
Screenshots output/gwms.LOCAL.pyunittest.d/gwms.LOCAL.pyunittest.d.test_lib_fork.txt
output/gwms.LOCAL.pyunittest.d/gwms.LOCAL.pyunittest.d.test_lib_x509Support.txt
output/gwms.LOCAL.pyunittest.d/gwms.LOCAL.pyunittest.d.test_OSG_autoconf.txt
output/gwms.LOCAL.pyunittest.d/gwms.LOCAL.pyunittest.d.test_lib_symCrypto.txt
Desktop (please complete the following information):
Additional context Add any other context or supporting files about the problem here.