From: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
To: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCHv2 2/2] oeqa/selftest/prservice: Added new tc: check pr-server stop msg
Date: Mon, 15 Feb 2016 13:48:09 -0600 [thread overview]
Message-ID: <1455565689.19294.12.camel@linux.intel.com> (raw)
In-Reply-To: <1455563442-11586-2-git-send-email-francisco.j.pedraza.gonzalez@intel.com>
Hi Paco, good to see you doing patches.
Please check my comments below.
On Mon, 2016-02-15 at 13:10 -0600, Francisco Pedraza wrote:
> When stopping the prserver using localhost as host, it tries to
> find a file '/tmp/PRServer_127.0.0.1_8585.pid' which is not
> present on the system.
>
> fix for [YOCTO #8258]
>
> Signed-off-by: Francisco Pedraza <
> francisco.j.pedraza.gonzalez@intel.com>
> ---
> meta/lib/oeqa/selftest/prservice.py | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oeqa/selftest/prservice.py
> b/meta/lib/oeqa/selftest/prservice.py
> index f22288e..fbde5a6 100644
> --- a/meta/lib/oeqa/selftest/prservice.py
> +++ b/meta/lib/oeqa/selftest/prservice.py
> @@ -9,9 +9,9 @@ import oeqa.utils.ftools as ftools
> from oeqa.selftest.base import oeSelfTest
> from oeqa.utils.commands import runCmd, bitbake, get_bb_var
> from oeqa.utils.decorators import testcase
> +from oeqa.utils.network import get_free_port
>
> class BitbakePrTests(oeSelfTest):
> -
seems like a line delete slipped here above
> def get_pr_version(self, package_name):
> pkgdata_dir = get_bb_var('PKGDATA_DIR')
> package_data_file = os.path.join(pkgdata_dir, 'runtime',
> package_name)
> @@ -119,3 +119,16 @@ class BitbakePrTests(oeSelfTest):
> @testcase(936)
> def test_pr_service_ipk_arch_indep(self):
> self.run_test_pr_service('xcursor-transparent-theme', 'ipk',
> 'do_package')
> +
> + @testcase(1419)
> + def test_stopping_prservice_message(self):
> + output_msg_passed = 'Waiting for pr-server to exit.'
> + err_msg = 'pidfile /tmp/PRServer_localhost_8585.pid does not
> exist. Daemon not running?'
while it is good to check for known error conditions, this one seems
very specific and could mutate easily. I.e. if the pidfile has a
different PID, the error message will not be the same as the one you
describe. This is better checked via a search expression.
> +
> + port = get_free_port()
> + runCmd('bitbake-prserv --host localhost --port %s -
> -loglevel=DEBUG --start' % port)
> + ret = runCmd('bitbake-prserv --host localhost --port %s -
> -loglevel=DEBUG --stop' % port)
> +
> + self.assertNotEqual(ret.output, err_msg)
You're checking the expected message first, that makes this second
check below for the unexpected message to be highly unlikely to happen
at this point.
I believe that checking just for the expected message would account for
the objective of the test.
> + self.assertEqual(ret.output, output_msg_passed)
> +
> --
> 2.5.0
>
next prev parent reply other threads:[~2016-02-15 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 19:10 [PATCHv2 1/2] oeqa/utils: added new networke module Francisco Pedraza
2016-02-15 19:10 ` [PATCHv2 2/2] oeqa/selftest/prservice: Added new tc: check pr-server stop msg Francisco Pedraza
2016-02-15 19:48 ` Benjamin Esquivel [this message]
2016-02-15 19:48 ` [PATCHv2 1/2] oeqa/utils: added new networke module Benjamin Esquivel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455565689.19294.12.camel@linux.intel.com \
--to=benjamin.esquivel@linux.intel.com \
--cc=francisco.j.pedraza.gonzalez@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.