* [PATCH] oeqa/runtime: Added one runtime testcase in connman.
@ 2015-07-15 14:35 Daniel Istrate
2015-07-16 17:46 ` Randy Witt
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Istrate @ 2015-07-15 14:35 UTC (permalink / raw)
To: openembedded-core
(testcase 223) Check that only one connmand runs in background.
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
---
meta/lib/oeqa/runtime/connman.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
index cc537f7..b040400 100644
--- a/meta/lib/oeqa/runtime/connman.py
+++ b/meta/lib/oeqa/runtime/connman.py
@@ -28,3 +28,26 @@ class ConnmanTest(oeRuntimeTest):
if status != 0:
print self.service_status("connman")
self.fail("No connmand process running")
+
+ @testcase(223)
+ def test_only_one_connmand_in_background(self):
+ """
+ Summary: Only one connmand in background
+ Expected: There will be only one connmand instance in background.
+ Product: BSPs
+ Author: Alexandru Georgescu <alexandru.c.georgescu@intel.com>
+ AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+ """
+
+ # Make sure that 'connmand' is running in background
+ (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
+ self.assertEqual(0, status, 'Failed to find "connmand" process running in background.')
+
+ # Start a new instance of 'connmand'
+ (status, output) = self.target.run('connmand')
+ self.assertEqual(0, status, 'Failed to start a new "connmand" process.')
+
+ # Make sure that only one 'connmand' is running in background
+ (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand | wc -l')
+ self.assertEqual(0, status, 'Failed to find "connmand" process running in background.')
+ self.assertEqual(1, int(output), 'Found {} connmand processes running, expected 1.'.format(output))
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] oeqa/runtime: Added one runtime testcase in connman.
2015-07-15 14:35 [PATCH] oeqa/runtime: Added one runtime testcase in connman Daniel Istrate
@ 2015-07-16 17:46 ` Randy Witt
2015-07-16 19:47 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: Randy Witt @ 2015-07-16 17:46 UTC (permalink / raw)
To: Daniel Istrate, openembedded-core
Hi Daniel and Alex,
On 07/15/2015 07:35 AM, Daniel Istrate wrote:
> (testcase 223) Check that only one connmand runs in background.
>
> Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
> ---
> meta/lib/oeqa/runtime/connman.py | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
> index cc537f7..b040400 100644
> --- a/meta/lib/oeqa/runtime/connman.py
> +++ b/meta/lib/oeqa/runtime/connman.py
> @@ -28,3 +28,26 @@ class ConnmanTest(oeRuntimeTest):
> if status != 0:
> print self.service_status("connman")
> self.fail("No connmand process running")
> +
> + @testcase(223)
> + def test_only_one_connmand_in_background(self):
> + """
> + Summary: Only one connmand in background
> + Expected: There will be only one connmand instance in background.
> + Product: BSPs
> + Author: Alexandru Georgescu <alexandru.c.georgescu@intel.com>
> + AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
> + """
> +
> + # Make sure that 'connmand' is running in background
> + (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
> + self.assertEqual(0, status, 'Failed to find "connmand" process running in background.')
> +
> + # Start a new instance of 'connmand'
> + (status, output) = self.target.run('connmand')
> + self.assertEqual(0, status, 'Failed to start a new "connmand" process.')
If multiple instances of connmand can run, is that not a bug it connmand rather
than in our configuration? I'm asking because it seems like this would be more
suited as a connman test that would be part of ptest.
Otherwise, why not test all daemons for multiple instances?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-16 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 14:35 [PATCH] oeqa/runtime: Added one runtime testcase in connman Daniel Istrate
2015-07-16 17:46 ` Randy Witt
2015-07-16 19:47 ` Burton, Ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox