Bug 13055 - oe-selftest runcmd.RunCmdTests.test_stdin failure
Summary: oe-selftest runcmd.RunCmdTests.test_stdin failure
Status: RESOLVED FIXED
Alias: None
Product: Functional (self) Testing
Classification: QA/Testing
Component: oe-selftest (show other bugs)
Version: 2.7
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.2 M2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard: AB-INT
Depends on:
Blocks:
 
Reported: 2018-12-01 13:01 UTC by Richard Purdie
Modified: 2020-06-23 15:03 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2018-12-01 13:01:45 UTC
http://errors.yoctoproject.org/Errors/Details/202611/
https://autobuilder.yoctoproject.org/typhoon/#builders/87/builds/31

2018-11-29 17:23:36,847 - oe-selftest - INFO - runcmd.RunCmdTests.test_stdin (subunit.RemotedTestCase)
2018-11-29 17:23:36,848 - oe-selftest - INFO -  ... FAIL
2018-11-29 17:23:36,848 - oe-selftest - INFO - 0: 16/21 38/338 (0.04s) (runcmd.RunCmdTests.test_stdin)
2018-11-29 17:23:36,848 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/runcmd.py", line 110, in test_stdin
    self.assertEqual(numthreads, threading.active_count())
  File "/usr/lib/python3.5/unittest/case.py", line 820, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.5/unittest/case.py", line 813, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 1 != 2


2018-11-29 17:23:41,899 - oe-selftest - INFO - runcmd.RunCmdTests.test_stdin_timeout (subunit.RemotedTestCase)
2018-11-29 17:23:41,899 - oe-selftest - INFO -  ... ok
Comment 1 Richard Purdie 2019-11-08 22:59:05 UTC
Occurred again:

https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/477

2019-11-08 20:53:52,904 - oe-selftest - INFO - ======================================================================
2019-11-08 20:53:52,904 - oe-selftest - INFO - FAIL: runcmd.RunCmdTests.test_stdin (subunit.RemotedTestCase)
2019-11-08 20:53:52,905 - oe-selftest - INFO - ----------------------------------------------------------------------
2019-11-08 20:53:52,905 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/runcmd.py", line 100, in test_stdin
    self.assertEqual(numthreads, threading.active_count())
  File "/usr/lib64/python3.7/unittest/case.py", line 852, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.7/unittest/case.py", line 845, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 1 != 2
Comment 2 Randy MacLeod 2019-11-19 16:31:07 UTC
It's good to get self-tests working reliably sooner rather than later so tar3.1-M1.
Comment 3 Randy MacLeod 2020-03-24 03:32:46 UTC
Richard, I tried to find out if this problem has been happening in the YP autobuilder in recent build failures but once again, my lack of skill at retrieving data from the autobuilder is apparent. I checked the most recent ~5 build errors that seemed like likely candidates but none match this signature.
Are you still seeing this error and if so can you explain how you find the logs in the autobuilder without examining the error section of each and every failure log?

I am filtering by oe-selftest-FOO, such as the ubuntu runs show here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87
Comment 5 Richard Purdie 2020-06-22 14:28:00 UTC
As a bit more information this test is testing passing "stdin" data to a command being run by "runCmd". The check is to see whether  threading.active_count() is the same at the end of the test as it is at the start. In this case there are clearly more active threads than when we started. The question is then, why?
Comment 6 Richard Purdie 2020-06-22 14:56:56 UTC
I think I figured this one out, you see the failure if you add a "time.sleep(10)" to the end of writeThread() in runCmd(). Patch sent.