Bug 8306

Summary: selftest.imagefeatures: None argument in os.path.join breaks some imagefeatures tests
Product: [QA/Testing] Build Testing Reporter: Benjamin Esquivel <benjamin.esquivel>
Component: generalAssignee: Mariano Lopez <mariano.lopez>
Status: VERIFIED FIXED QA Contact: Daniel Istrate <daniel.alexandrux.istrate>
Severity: normal    
Priority: Medium+ CC: bluelightning, bogdanx.a.voiculescu, sgw
Version: 1.9   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
stdio text file
none
Nightly oe-selftest 231 build log none

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