Bug 11650 - Ctrl+C from oe-selftest corrupts local.conf
Summary: Ctrl+C from oe-selftest corrupts local.conf
Status: RESOLVED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M2
Assignee: Aníbal Limón
QA Contact:
URL:
Whiteboard:
: 11682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-13 09:04 UTC by Richard Purdie
Modified: 2017-07-24 16:09 UTC (History)
1 user (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 2017-06-13 09:04:39 UTC
While the initial setup is running with oe-selftest, if you hit Ctrl+C, local.conf is left corrupted:

$ oe-selftest -r sstatetests.SStateTests.test_sstate_noop_samesigs
2017-06-13 10:00:18,229 - oe-selftest - INFO - Adding layer libraries:
2017-06-13 10:00:18,229 - oe-selftest - INFO - 	/media/build1/poky/meta/lib
2017-06-13 10:00:18,229 - oe-selftest - INFO - 	/media/build1/poky/meta-yocto-bsp/lib
2017-06-13 10:00:18,229 - oe-selftest - INFO - 	/media/build1/poky/meta-selftest/lib
2017-06-13 10:00:18,230 - oe-selftest - INFO - Running bitbake -p
2017-06-13 10:00:24,845 - oe-selftest - INFO - 
2017-06-13 10:00:24,845 - oe-selftest - INFO - Running tests...
2017-06-13 10:00:24,845 - oe-selftest - INFO - ----------------------------------------------------------------------
^CTraceback (most recent call last):
  File "/media/build1/poky/scripts/oe-selftest", line 70, in <module>
    ret = main()
  File "/media/build1/poky/scripts/oe-selftest", line 57, in main
    results = args.func(logger, args)
  File "/media/build1/poky/meta/lib/oeqa/selftest/context.py", line 214, in run
    rc = self._internal_run(logger, args)
  File "/media/build1/poky/meta/lib/oeqa/selftest/context.py", line 181, in _internal_run
    rc = self.tc.runTests(**self.tc_kwargs['run'])
  File "/media/build1/poky/meta/lib/oeqa/selftest/context.py", line 34, in runTests
    return super(OESelftestTestContext, self).runTests()
  File "/media/build1/poky/meta/lib/oeqa/core/context.py", line 57, in runTests
    result = self.runner.run(self.suites)
  File "/home/richard/.local/lib/python3.5/site-packages/xmlrunner/runner.py", line 66, in run
    test(result)
  File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.5/unittest/case.py", line 649, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.5/unittest/case.py", line 601, in run
    testMethod()
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/sstatetests.py", line 446, in test_sstate_noop_samesigs
    bitbake("world meta-toolchain -S none")
  File "/media/build1/poky/meta/lib/oeqa/utils/commands.py", line 156, in bitbake
    return runCmd(cmd, ignore_status, timeout, **options)
  File "/media/build1/poky/meta/lib/oeqa/utils/commands.py", line 116, in runCmd
    cmd.run()
  File "/media/build1/poky/meta/lib/oeqa/utils/commands.py", line 69, in run
    self.thread.join(self.timeout)
  File "/usr/lib/python3.5/threading.py", line 1054, in join
    self._wait_for_tstate_lock()
  File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
KeyboardInterrupt
^CException ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'>
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown
    t.join()
  File "/usr/lib/python3.5/threading.py", line 1054, in join
    self._wait_for_tstate_lock()
  File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
KeyboardInterrupt
richard@jet:/media/build1/poky/build$ oe-selftest -r sstatetests.SStateTests.test_sstate_noop_samesigs
2017-06-13 10:02:02,038 - oe-selftest - ERROR - You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.

[due to lines at the end of local.conf left by the tests]

Before the restructuring you used to be able to Ctrl+C out safely.
Comment 1 Aníbal Limón 2017-06-23 17:55:35 UTC
*** Bug 11682 has been marked as a duplicate of this bug. ***