Bug 13730

Summary: devtool tests break with strange files in tree
Product: [QA/Testing] Functional (self) Testing Reporter: Richard Purdie <richard.purdie>
Component: oe-selftestAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: minor    
Priority: Medium CC: mathieu.dubois-briand, matthewzmd, randy.macleod
Version: unspecified   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Richard Purdie 2020-01-09 11:20:37 UTC
There wasa rebase change I'd skipped which left 'bad' files in the filesystem. This caused oe-selftest to break, probably due to bad quoting?

2020-01-09 10:42:53,563 - oe-selftest - INFO - ======================================================================
2020-01-09 10:42:53,563 - oe-selftest - INFO - ERROR: setUpModule (devtool)
2020-01-09 10:42:53,563 - oe-selftest - INFO - ----------------------------------------------------------------------
2020-01-09 10:42:53,563 - oe-selftest - INFO - Traceback (most recent call last):
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 67, in setUpModule
    bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
  File "/media/build1/poky/bitbake/lib/bb/utils.py", line 1411, in edit_bblayers_conf
    (updated, newlines) = edit_metadata(newlines, ['BBLAYERS'], handle_bblayers)
  File "/media/build1/poky/bitbake/lib/bb/utils.py", line 1241, in edit_metadata
    if handle_var_end():
  File "/media/build1/poky/bitbake/lib/bb/utils.py", line 1166, in handle_var_end
    (newvalue, newop, indent, minbreak) = varfunc(in_var, full_value, op, newlines)
  File "/media/build1/poky/bitbake/lib/bb/utils.py", line 1376, in handle_bblayers
    res = edit_cb(layer, canonicalise_path(layer))
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 63, in bblayers_edit_cb
    shutil.copy2(pth, destdir)
  File "/usr/lib/python3.6/shutil.py", line 263, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/media/build1/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux~XXX'

2020-01-09 10:42:53,563 - oe-selftest - INFO - ----------------------------------------------------------------------
2020-01-09 10:42:53,564 - oe-selftest - INFO - Ran 0 tests in 10.971s
2020-01-09 10:42:53,564 - oe-selftest - INFO - FAILED
2020-01-09 10:42:53,564 - oe-selftest - INFO -  (errors=1)
2020-01-09 10:42:59,545 - oe-selftest - INFO - RESULTS:
2020-01-09 10:42:59,546 - oe-selftest - INFO - RESULTS - devtool.DevtoolAddTests.test_devtool_add_git_local: ERROR
2020-01-09 10:42:59,633 - oe-selftest - INFO - SUMMARY:
2020-01-09 10:42:59,633 - oe-selftest - INFO - oe-selftest () - Ran 0 tests in 10.972s
2020-01-09 10:42:59,633 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=0, skipped=0, failures=0, errors=1)
$ ls /media/build1/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/
 common   common-glibc   common-linux   common-linux~HEAD  'common-linux~XXX glib: generic cross file mojo'   common-mingw   common-musl
Comment 1 Mingde (Matthew) Zeng 2021-02-05 05:24:52 UTC
Is this bug still reproducible? I had a look at devtool.py, nothing around bad quoting is immediately obvious.

If this is still reproducible, when the FileNotFoundError is raised, what is the directory '/media/build1/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux~XXX' look like? Does it actually exist in the file system?
Comment 2 Randy MacLeod 2021-04-22 18:57:03 UTC
Matthew, I'm not sure if it's reproducible. I can check in a few weeks if you ping me.
Comment 3 Mingde (Matthew) Zeng 2021-04-27 23:10:59 UTC
@Randy: Sounds good, with the exams out of the way, I'm having more free time now, I can have a look at some issues if needed.
Comment 4 Randy MacLeod 2021-04-27 23:35:55 UTC
Hey Matthew, Nice to hear from you. If you want to take a look that'd be super.
Comment 5 Randy MacLeod 2022-04-11 22:05:25 UTC
Moving to 2.6 and unassigning. @Matthew, take it back if you are interested.
Comment 6 Randy MacLeod 2023-10-30 15:37:27 UTC
Build move to 5.0 -- ../Randy
Comment 7 Randy MacLeod 2024-04-25 01:13:53 UTC
Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.
Comment 8 Randy MacLeod 2024-04-25 01:23:12 UTC
Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.