All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: "Aníbal Limón" <anibal.limon@linux.intel.com>
Cc: joshua.g.lock@intel.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 01/30] oeqa/core/loader: Switch method definition for _make_failed_test
Date: Mon, 17 Jul 2017 22:03:43 +0200	[thread overview]
Message-ID: <1500321823.5689.17.camel@intel.com> (raw)
In-Reply-To: <5e179f7e-bf5a-0dd2-b569-7a118ec80c63@linux.intel.com>

On Mon, 2017-07-17 at 14:41 -0500, Aníbal Limón wrote:
> 
> On 07/17/2017 02:14 PM, Patrick Ohly wrote:
> > On Fri, 2017-07-14 at 10:27 -0500, Aníbal Limón wrote:
> >>
> >> On 07/14/2017 04:52 AM, Patrick Ohly wrote:
> >>> On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote:
> >>>> This was a mistake of me to define wrong what methods needs
> >>>> to be defined by certain python version.
> >>>>
> >>>> See rev d8380d098a290510b442a7abd2dd5a50cabf5844.
> >>>
> >>> This will fix this error that we see in Refkit with current OE-core
> >>> master, right?
> >>>
> >>> 00:07:10.313 Traceback (most recent call last):
> >>> 00:07:10.313   File "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest", line 70, in <module>
> >>> 00:07:10.313     ret = main()
> >>> 00:07:10.313   File "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest", line 57, in main
> >>> 00:07:10.313     results = args.func(logger, args)
> >>> 00:07:10.313   File "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py", line 215, in run
> >>> 00:07:10.313     rc = self._internal_run(logger, args)
> >>> 00:07:10.313   File "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py", line 176, in _internal_run
> >>> 00:07:10.313     self.tc.loadTests(self.module_paths, **self.tc_kwargs['load'])
> >>> 00:07:10.313   File "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/context.py", line 51, in loadTests
> >>> 00:07:10.313     self.suites = self.loader.discover()
> >>> 00:07:10.313   File "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/loader.py", line 286, in discover
> >>> 00:07:10.313     pattern='*.py', top_level_dir=path)
> >>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 275, in discover
> >>> 00:07:10.313     tests = list(self._find_tests(start_dir, pattern))
> >>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 327, in _find_tests
> >>> 00:07:10.313     yield _make_failed_import_test(name, self.suiteClass)
> >>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 39, in _make_failed_import_test
> >>> 00:07:10.313     return _make_failed_test(name, ImportError(message), suiteClass)
> >>> 00:07:10.313 TypeError: _make_failed_test() missing 1 required positional argument: 'suiteClass'
> >>>
> >>> Can this particular patch please be merged into OE-core master
> >>> independently from the patch series? It's not really related to it
> >>> anyway.
> >>
> >> Yes this will fix that error, showing the error into the case.
> > 
> > The fix doesn't work for me:
> > 
> >   File "/usr/lib/python3.5/unittest/loader.py", line 41, in _make_failed_import_test
> >     return _make_failed_test(name, ImportError(message), suiteClass, message)
> > TypeError: _make_failed_test() takes 3 positional arguments but 4 were given
> > 
> > You need to mimic the exact same signature as in Python itself, and
> > Python 3.5 seems to be different again:
> > 
> > /usr/lib/python3.5/unittest/loader.py:def _make_failed_test(methodname, exception, suiteClass, message):
> 
> This is strange, i tested on a python 3.5.x and python 3.4.3 versions.
> I don't know why isn't working on your machine.

Have you tested with a test case that fails?

python3.5 = 3.5.3 definitely has four parameters, as quoted above.

I don't know which version has "def _make_failed_test(classname,
exception, suiteClass)".

The actual error in refkit is:

ImportError: Failed to import test module: refkit_ostree
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/fast/work/intel-iot-refkit-pr/meta-refkit-core/lib/oeqa/selftest/cases/refkit_ostree.py", line 12, in <module>
    class RefkitOSTreeUpdateBase(SystemUpdateBase):
  File "/fast/work/intel-iot-refkit-pr/meta-refkit-core/lib/oeqa/selftest/cases/refkit_ostree.py", line 35, in RefkitOSTreeUpdateBase
    'socat-native')
  File "/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py", line 227, in get_bb_vars
    bbenv = get_bb_env(target, postconfig=postconfig)
  File "/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py", line 221, in get_bb_env
    return bitbake("-e %s" % target, postconfig=postconfig).output
  File "/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py", line 213, in bitbake
    return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
  File "/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py", line 191, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'bitbake  -e socat-native' returned non-zero exit status 1:
Loading cache...done.
Loaded 3495 entries from dependency cache.
Parsing recipes...done.
ERROR: No recipes available for:
  /fast/work/intel-iot-refkit-pr/openembedded-core/../meta-refkit-core/bbappends/meta-security/recipes-tpm/swtpm/swtpm-wrappers-native.bbappend
  /fast/work/intel-iot-refkit-pr/openembedded-core/../meta-refkit-core/bbappends/meta-security/recipes-tpm/trousers/trousers_%.bbappend
Parsing of 2606 .bb files complete (2602 cached, 4 parsed). 3499 targets, 415 skipped, 0 masked, 0 errors.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

RefkitOSTreeUpdateBase calls get_bb_vars() as part of the class
definition. That's the part that is failing.

The failure is caused by meta-security re-structuring the layers. Will
be easy enough to fix in meta-refkit-core, now that I know what it is.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





  reply	other threads:[~2017-07-17 20:03 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 20:23 [PATCH 00/30] oeqa core and oe-selftest threaded enablement Aníbal Limón
2017-07-11 20:23 ` [PATCH 01/30] oeqa/core/loader: Switch method definition for _make_failed_test Aníbal Limón
2017-07-14  9:52   ` Patrick Ohly
2017-07-14 15:27     ` Aníbal Limón
2017-07-17 19:14       ` Patrick Ohly
2017-07-17 19:41         ` Aníbal Limón
2017-07-17 20:03           ` Patrick Ohly [this message]
2017-07-11 20:23 ` [PATCH 02/30] oeqa/selftest/{context, case}: Handle KeyboardInterrupt/SIGINT and SIGTERM Aníbal Limón
2017-07-12 14:18   ` Leonardo Sandoval
2017-07-12 14:53     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 03/30] selftest/cases/package: Call parent setUpClass method Aníbal Limón
2017-07-12  6:51   ` Patrick Ohly
2017-07-12 15:44     ` Aníbal Limón
2017-07-12 17:14       ` Patrick Ohly
2017-07-11 20:23 ` [PATCH 04/30] bb/tinfoil: run_command handle busy status in bitbake server Aníbal Limón
2017-07-11 20:23 ` [PATCH 05/30] oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from env Aníbal Limón
2017-07-11 20:23 ` [PATCH 06/30] oeqa/core/threaded: Enable support to use the main thread Aníbal Limón
2017-07-11 20:23 ` [PATCH 07/30] oeqa/core/threaded: Add support to run into a thread at end of execution Aníbal Limón
2017-07-12 14:22   ` Leonardo Sandoval
2017-07-12 14:54     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 08/30] oeqa/core/threaded: logSummary add skipped tests info Aníbal Limón
2017-07-11 20:23 ` [PATCH 09/30] oeqa/core/tests: Update test_loader threaded to cover main thread usage Aníbal Limón
2017-07-11 20:23 ` [PATCH 10/30] oeqa/selftest/{case, context}: Add builddir by test class and context Aníbal Limón
2017-07-11 20:23 ` [PATCH 11/30] oeqa/selftest/case: Add wrappers to utils.commands modules Aníbal Limón
2017-07-11 20:23 ` [PATCH 12/30] oeqa/selftest/case: Creates meta-selftest layer per class Aníbal Limón
2017-07-11 20:23 ` [PATCH 13/30] oeqa/selftest/case: tearDown extra commands print what actually fails Aníbal Limón
2017-07-11 20:23 ` [PATCH 14/30] oeqa/selftest/case: Support bitbake memres mode in per build directory Aníbal Limón
2017-07-11 20:23 ` [PATCH 15/30] oeqa/selftest/cases: Use testlayer_path instead of call get_test_layer() Aníbal Limón
2017-07-11 20:23 ` [PATCH 16/30] oeqa/selftest/cases: Use builddir from class instead of get from environment Aníbal Limón
2017-07-11 20:23 ` [PATCH 17/30] oeqa/selftest/cases: Use wrapper methods from OESelfTestCase class Aníbal Limón
2017-07-11 20:23 ` [PATCH 18/30] oeqa/selftest/cases: tinfoil to run in the main thread Aníbal Limón
2017-07-12  6:56   ` Patrick Ohly
2017-07-12 14:55     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 19/30] oeqa/selftest/cases: imagefeatures enable threaded runs Aníbal Limón
2017-07-11 20:23 ` [PATCH 20/30] oeqa/selftest/cases: runqemu enable thraded runs Aníbal Limón
2017-07-12  7:15   ` Patrick Ohly
2017-07-12 15:01     ` Aníbal Limón
2017-07-14  9:35       ` Patrick Ohly
2017-07-14 15:27         ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 21/30] oeqa/selftest/cases: runtime enable threaded runs Aníbal Limón
2017-07-11 20:23 ` [PATCH 22/30] oeqa/selftest/cases: eSDK " Aníbal Limón
2017-07-11 20:23 ` [PATCH 23/30] oeqa/selftest/cases: devtool " Aníbal Limón
2017-07-11 20:23 ` [PATCH 24/30] oeqa/selftest/cases: recipetool enable for " Aníbal Limón
2017-07-11 20:23 ` [PATCH 25/30] oeqa/selftest/cases: Move devtool deploy test case to own module Aníbal Limón
2017-07-11 20:23 ` [PATCH 26/30] selftest/cases/devtool{, end}: Move update/finish_modify tests to its " Aníbal Limón
2017-07-11 20:23 ` [PATCH 27/30] seltest/cases/devtool: Build dbus on test_devtool_add_git_local Aníbal Limón
2017-07-11 20:23 ` [PATCH 28/30] argparse_oe: Add int_positive type Aníbal Limón
2017-07-12 14:33   ` Leonardo Sandoval
2017-07-12 14:56     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 29/30] oeqa/selftest/context: Enable support for threaded runs Aníbal Limón
2017-07-11 20:23 ` [PATCH 30/30] oeqa/selftest/cases: systemd_boot enable " Aníbal Limón
2017-07-11 20:31 ` ✗ patchtest: failure for oeqa core and oe-selftest threaded enablement Patchwork

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=1500321823.5689.17.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=anibal.limon@linux.intel.com \
    --cc=joshua.g.lock@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.