avocado
avocado copied to clipboard
avocado.utils.get_children_pids() behavior on s390x during RPM builds on COPR
As it can be seen here, Fedora 33 and 34 builds are failing for s390x.
The exact failure is with check-577-selftests/unit/utils/test_process.py:MiscProcessTests.test_get_children_pids ERROR
. Using an 82lts based build output (which still used selftests/run
and would output the failures to the stdout), the message is:
======================================================================
ERROR: test_get_children_pids (selftests.unit.test_utils_process.MiscProcessTests)
Gets the list of children process. Linux only.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/avocado-77f32c36e04f2caddb5f410edf8d1a6138533c63/selftests/unit/test_utils_process.py", line 359, in test_get_children_pids
self.assertGreaterEqual(len(process.get_children_pids(1)), 1)
File "/builddir/build/BUILD/avocado-77f32c36e04f2caddb5f410edf8d1a6138533c63/avocado/utils/process.py", line 180, in get_children_pids
this_parent_pid = int(proc_stat_fp.read().split(b' ')[-49])
IndexError: list index out of range
----------------------------------------------------------------------
Ran 496 tests in 23.297s
This is interesting because the Travis CI s390x jobs pass, and I've verified that test is executed:
(check-577/1059) selftests/unit/utils/test_process.py:MiscProcessTests.test_get_children_pids: STARTED
(check-577/1059) selftests/unit/utils/test_process.py:MiscProcessTests.test_get_children_pids: PASS (0.02 s)
This seems to be a difference in the format of /proc/$pid/stat
on the s390x environment used on COPR.
This is interesting because the Travis CI s390x jobs pass, and I've verified that test is executed:
(check-577/1059) selftests/unit/utils/test_process.py:MiscProcessTests.test_get_children_pids: STARTED (check-577/1059) selftests/unit/utils/test_process.py:MiscProcessTests.test_get_children_pids: PASS (0.02 s)
Not anymore, travis tries to run this (despite the @unittest.skipIf(platform.machine() == 's390x'
) and the tests stalls there until travis times out the process after 10 min.
I'm looking at it as part of PR https://github.com/avocado-framework/avocado/pull/5167
Here is what I got:
- when running
selftests/unit/utils/test_process.py:MiscProcessTests.test_get_children_pids
on travis/s390x, the test starts and stalls until it's killed for inactivity. See: https://app.travis-ci.com/github/ana/avocado/builds/242783564#L1845 The test is run even with the@unittest.skipIf(platform.machine() == 's390x'
conditional.
If I revert https://github.com/avocado-framework/avocado/commit/3c618acc24990481e28282423ac49f48548ccedb it works, see: https://app.travis-ci.com/github/avocado-framework/avocado/jobs/550547420#L1971
I went to check the s390x builds in copr but there are not there anymore?! Do you know @clebergnu ?
@ana doesn't the non-skip (when a skip was given) look like a bug in itself? I'm fine with reactivating the test, but the behavior we're seeing with the stkipIf()
present just doesn't look right. Maybe the avocado-runner-python-unittest
process is crashing and this is leaving the job waiting forever...