Bug 8306 - selftest.imagefeatures: None argument in os.path.join breaks some imagefeatures tests
Summary: selftest.imagefeatures: None argument in os.path.join breaks some imagefeatur...
Status: VERIFIED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 1.9
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.0
Assignee: Mariano Lopez
QA Contact: Daniel Istrate
URL:
Whiteboard:
: 8305 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-15 19:32 UTC by Benjamin Esquivel
Modified: 2015-10-26 16:09 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
stdio text file (33.82 KB, text/plain)
2015-09-15 19:33 UTC, Benjamin Esquivel
no flags Details
Nightly oe-selftest 231 build log (18.88 KB, text/x-log)
2015-10-26 16:09 UTC, Daniel Istrate
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Esquivel 2015-09-15 19:32:44 UTC
The following tests:

test_devtool_deploy_target,
test_all_users_can_connect_via_ssh_without_password,
test_non_root_user_can_connect_via_ssh_without_password,
test_rpm_version_4_support_on_image,

show this same error:

elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

When executed in oe-selftest autobuild. Log can be seen here:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/191/steps/Running%20oe-selftest/logs/stdio

or in the attached stdio.txt
Comment 1 Benjamin Esquivel 2015-09-15 19:33:19 UTC
Created attachment 2733 [details]
stdio text file
Comment 2 Benjamin Esquivel 2015-09-15 21:46:47 UTC
This is a sample of what's going on at the utils/dump.py:

>>> os.path.join(None, "something")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
>>>
Comment 3 Paul Eggleton 2015-09-16 13:01:05 UTC
Looking at the code it appears that this may be being caused by TESTIMAGE_DUMP_DIR not being set. We do set a default in testimage.bbclass but that's not being seen here because we are using runtime test code from oe-selftest which does not use testimage.bbclass.
Comment 4 Saul Wold 2015-09-17 14:56:37 UTC
*** Bug 8305 has been marked as a duplicate of this bug. ***
Comment 5 Benjamin Esquivel 2015-09-17 16:40:16 UTC
Right Paul, Mariano and I confirmed on Tuesday that the variable not set was the culprit of this error.
Comment 6 Mariano Lopez 2015-09-22 19:27:46 UTC
Because there is several ways to create a QemuTarget, a way to cover all the cases is to have defaults in the BaseDumper class, this was added and sent for review.
Comment 7 Mariano Lopez 2015-09-25 14:11:27 UTC
This has been solved in commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=68073270f8674104774bee90cf54945a3f6224a8
Comment 8 Daniel Istrate 2015-10-26 16:06:09 UTC
Verified in master: 505a82673ac2487df5ea343a6422c2fc47018831

The tests are passing now: https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/231/steps/Running%20oe-selftest/logs/stdio/text
Comment 9 Daniel Istrate 2015-10-26 16:09:39 UTC
Created attachment 2826 [details]
Nightly oe-selftest 231 build log