mirror of
https://git.yoctoproject.org/poky
synced 2026-03-30 17:02:22 +02:00
The connman unique test starts another instance of connmand and then does a ps to verify that there's only one of these running, on the assumption that the new one has quit because there's already one running (started by init). However, connmand is forking into the background straight away so there's a race between running ps and the second connmand discovering the first and exiting. This race can be seen because the test displays the output of ps, and by the time that second ps has been executed the new connmand has exited. This is a classic race condition and on a heavily loaded autobuilder inserting an arbitrary sleep isn't wise. In the scheme of things this test isn't very useful, so delete it. (From OE-Core rev: 80ef721140c79e29430d0a5692a5c176db0061e6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 lines
777 B
Python
22 lines
777 B
Python
import unittest
|
|
from oeqa.oetest import oeRuntimeTest, skipModule
|
|
from oeqa.utils.decorators import *
|
|
|
|
def setUpModule():
|
|
if not oeRuntimeTest.hasPackage("connman"):
|
|
skipModule("No connman package in image")
|
|
|
|
|
|
class ConnmanTest(oeRuntimeTest):
|
|
|
|
@skipUnlessPassed('test_ssh')
|
|
def test_connmand_help(self):
|
|
(status, output) = self.target.run('/usr/sbin/connmand --help')
|
|
self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
|
|
|
|
|
|
@skipUnlessPassed('test_connmand_help')
|
|
def test_connmand_running(self):
|
|
(status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
|
|
self.assertEqual(status, 0, msg="no connmand process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1])
|