summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* deb: Move package manager to its own dirFredrik Gustafsson2020-07-271-2/+1
| | | | | | | | | | | | This is a part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. RP: Fixes to parse/build (From OE-Core rev: 510d5c48c0496f23a3d7aede76ea8735da2d371d) Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ipk: Move package manager to its own dirFredrik Gustafsson2020-07-271-1/+2
| | | | | | | | | | | | This is part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. RP: Fixes to parse/build (From OE-Core rev: 3ef5a3c885e1010cddfe7eba1cd3728f15270d78) Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Move package manager to its own dirFredrik Gustafsson2020-07-271-1/+3
| | | | | | | | | | | | This is part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. RP: Fixes to parse/build (From OE-Core rev: 8b776ed9ed291dd8e112621561762449c7eb5ee2) Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: Add priority/nice information for running processesRichard Purdie2020-07-222-2/+2
| | | | | | | | | | We're seeing failures due to system load. In theory we've set process nice levels which should compensate for this. Add debugging so we can find out if they're being correctly applied. (From OE-Core rev: 1e4e345bba8216b9b5623682206a7dae7cad261c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/qemurunner: Fix missing pid file tracebacksRichard Purdie2020-07-141-1/+1
| | | | | | | | | One element of the error message guarded against None as a value but I missed the other, fix this. (From OE-Core rev: dbce6baec68d7658453b8c44159e1d1fef746151) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Add extra debug info when qemu fails to startRichard Purdie2020-07-131-0/+9
| | | | | | | | | | | | When qemu fails to start we're struggling to work out why. Add more debug info which can at least confirm/rule out various things. This code is only on the error handling path and more info shoudl help us debug issues. (From OE-Core rev: 3001d0d8f3429e5ff0c37ea7192e85e7001cdb32) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Ensure pid location is deterministicRichard Purdie2020-07-131-2/+4
| | | | | | | | | | | | The pid location could vary due to changes in cwd as only a filename is specified, not a full path. This in theory could be resulting in some of our autobuilder failures. Whilst its difficult to know if this is causing a problem, Using a full path removes any question of such an issue. (From OE-Core rev: 55c186ff410c99570242478b99ac24ebc40aa6bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sstatetests: Avoid polluting DL_DIRRichard Purdie2020-07-121-1/+4
| | | | | | | | | Every selftest run is currently polluting the autobuilder DL_DIR. Avoid this by using a temporary directory for the test which is cleaned up. (From OE-Core rev: 002d321e02b3ce4f34c8a54211b109a5416c8a0e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/loader: fix regex to include numbersVacek, Patrick2020-07-081-1/+1
| | | | | | | | | | | The previous version only included the numbers 1 and 2 in the allowed characters for the module name. In the past, this was (\w+) so all numbers were allowed. Now it explicitly includes all numbers again. (From OE-Core rev: f241fa493536ac953c1dac303917c6e75b459e28) Signed-off-by: Patrick Vacek <patrickvacek@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* logrotate.py: fix testimage occasionally failureChangqing Li2020-07-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | testcase test_systemd_failed occasionally failed with below error: Failed to start Rotate log files. logrotate.service: Failed with result 'exit-code'. logrotate.service: Main process exited, code=exited, status=1/FAILURE error: stat of /var/log/logrotate_test failed: No such file or directory error: logrotate_test:1 lines must begin with a keyword or a filename (possibly in double quotes) above failure caused since testcase test_logrotate_wtmp add /etc/logrotate.d/logrotate_test, which need /var/log/logrotate_test, but there is no such file. so when logrotate.service is triggerd by logrotate.timer after testcase test_logrotate_wtmp is runned, the testcase test_systemd_failed will fail. these 3 lines are useless, so remove them to fix above problem. (From OE-Core rev: 22f5f7f86a4d47624c476be00e5121009c48cb7b) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/targetcontrol: Attempt to fix log closure warning messageRichard Purdie2020-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | We continue to see the warning message: WARNING: lib/bb/daemonize.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper name='build/tmp/work/qemux86_64-poky-linux/oe-selftest-image/1.0-r0/testimage/qemurunner_log.20200703011821' mode='a' encoding='UTF-8'> I've been unable to reprodue this but believe its caused by garbage collection of the FileHandler used in QemuTarget being delayed until after a new tinfoil instance is created by a subseqent test. Force the log file to be closed when we stop using it to avoid this. [YOCTO #13961] (From OE-Core rev: e15cc7801ec611f867f5b31028741722ac718c87) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: recipetool/devtool: Avoid load_plugin test raceRichard Purdie2020-07-032-2/+10
| | | | | | | | | | | | | | | | | This bug has plagued the autobuilder for a couple of years and we've struggled to reproduce/debug it. The problem is the "lib" directory in meta-poky used during the load_plugin tests for recipetool and devtool can race and one can delete the files from the other leading to test failures. Deleting the lib directory only if empty will avoid this. [YOCTO #13070] (From OE-Core rev: d603e2fd589e1edbc67c8c2fefb6337e728b9d01) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/loader: refine regex to find moduleLee Chee Yang2020-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | test case in format <module name>.<class name>.<test case name> this is clear when test cases is only 3 item deep. but confused when it is 4 item deep, eg, oelib.types.TestList.test_list_nosep in this case, oelib and oelib.types can both be treated as module since module name contains only lower cases and class name should contain atleast one upper case. so, always treat leading item without upper case as module also allow module name to contain dot. [YOCTO #13941] (From OE-Core rev: ad81ea90a815389e45ff302a85151724c71f71c3) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oescripts: ignore whitespaces when comparing linesChen Qi2020-07-021-1/+1
| | | | | | | | | | | | | | | | | | | list-packageconfig-flags.py determines the whitespace numbers according to the longest package name. This is reasonable for the tool as it's trying to generate pretty output. However, in this selftest case, the output is hardcoded. This results in "pinentry gtk2 libcap ncurses qt secret" not recognized as correct as the expected line is: "pinentry gtk2 libcap ncurses qt secret". The difference is only about whitespaces. So we should ignore the whitespaces when comparing lines. (From OE-Core rev: 17c89ad1596dbc7cefdd2c01dcd95aa9e93c5dc6) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oescripts.py: fix typoChen Qi2020-07-021-1/+1
| | | | | | | (From OE-Core rev: 115d44958806a2c73d0bf140f45c11db462cc7db) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Clean up separate builddir in success case when non-threadedRichard Purdie2020-06-282-22/+37
| | | | | | | | | | | | | | | | | | If oe-selftest is run without -j, the separate build directory "build-st" isn't cleaned up afterwards. Mirror the behaviour of the -j option to handle this the same way, only preserve upon failure. To do this, the remove function needs to be moved to the selftest context module so that it can be accessed without requiring the testtools and subunit modules the -j option requires. A dummy wrapper class is used to wrap the tests and clean up afterwards. [YOCTO #13953] (From OE-Core rev: 1b376ade430d40d3cfe9c18f200c764d622710e5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases/ptest: Make output content path absoluteAndrej Valek2020-06-231-0/+4
| | | | | | | | | | | The output content is created in current directory, because json content has no defined absolute path to WORKDIR as in bitbake. (From OE-Core rev: 14203b2cb9aa62f55cb12230ac8012b3cd995be7) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/command: Improve stdin handling in runCmdRichard Purdie2020-06-231-1/+3
| | | | | | | | | | | | | | | | | | Occasionally we've been seeing leftover threads from runCmd. The stdin test assumes we clean up all threads but the code assumes that the daemonic thread can be left behind. The issue can be reproduced by adding a time.sleep(10) to the end of writeThread() which will mean it stays resident past the end of the command. We may as well add it to the threads list and clean it up properly, hopefully removing the race in the tests from the autobuilder. [YOCTO #13055] (From OE-Core rev: 9b251dcaffe52d32c1faf41ab57ab414fbc29722) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runcmd: Add better debug for thread count mismatch failuresRichard Purdie2020-06-231-4/+5
| | | | | | (From OE-Core rev: d15d0177d328fa3a126b9942bda177f6fae68505) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: Add OERequirePackage decoratorKonrad Weihmann2020-06-171-2/+32
| | | | | | | | | | | | | | | Add new decorator which behaves like OEHasPackage, but fails the testcase if a dependency isn't met. This helps to identify missing packages in the image under test when using static test suite lists, otherwise a missing package won't fail the overall test suite and errors might slip through unnoticed (From OE-Core rev: c5be39df1494f33e2cae116e4930f2a0f3dd2000) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Add simplistic file move detectionRichard Purdie2020-06-153-0/+18477
| | | | | | | | | | | | | | | | | We'd like to use buildhistory more during patch review however its proving hard, particularly where whole subtrees of files move, such as a kernel version upgrade, or where a software module moves include directory. This adds file rename matching which covers our common case of library moves, kernel upgrades and more. A new test case is also added so that someone in the future can change the code and test the logic is still doing the expected things. (From OE-Core rev: 791ce304f5e066759874beac0feef5ee62a1c255) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Fix --extra-space argument handlingJoshua Watt2020-06-121-0/+15
| | | | | | | | | | | 467f84e12b ("wic: Add --offset argument for partitions") broke the --extra-space argument handling in wic. Fix the option and add a unit test for the argument. (From OE-Core rev: 87722a92c18f94917c8f70afc8cd0763462a5c25) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Speed up testsPaul Barker2020-06-091-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running tests locally without the advantage of a populated sstate cache, the archiver tests can take an unnecessarily long time. Using different target recipes can speed things up a lot by reducing the number of dependencies that are built. For the test case test_archiver_srpm_mode we can still test the conditions described in bug #11121 by using a target recipe that is known to inherit the nopackages class as well as a more normal recipe, instead of having to compute all the depepndencies of core-image-sato. Before: archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name: PASSED (20.50s) archiver.Archiver.test_archiver_filters_by_type: PASSED (14.16s) archiver.Archiver.test_archiver_filters_by_type_and_name: PASSED (79.08s) archiver.Archiver.test_archiver_mode_configured: PASSED (558.19s) archiver.Archiver.test_archiver_mode_diff: PASSED (14.59s) archiver.Archiver.test_archiver_mode_dumpdata: PASSED (14.41s) archiver.Archiver.test_archiver_mode_mirror: PASSED (14.02s) archiver.Archiver.test_archiver_mode_mirror_combined: PASSED (19.99s) archiver.Archiver.test_archiver_mode_mirror_excludes: PASSED (14.24s) archiver.Archiver.test_archiver_mode_mirror_gitsm: PASSED (13.47s) archiver.Archiver.test_archiver_mode_mirror_gitsm_shallow: PASSED (22.15s) archiver.Archiver.test_archiver_mode_original: PASSED (14.15s) archiver.Archiver.test_archiver_mode_patched: PASSED (14.57s) archiver.Archiver.test_archiver_mode_recipe: PASSED (14.56s) archiver.Archiver.test_archiver_srpm_mode: PASSED (83.03s) oe-selftest () - Ran 15 tests in 911.905s After: archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name: PASSED (23.66s) archiver.Archiver.test_archiver_filters_by_type: PASSED (15.16s) archiver.Archiver.test_archiver_filters_by_type_and_name: PASSED (15.33s) archiver.Archiver.test_archiver_mode_configured: PASSED (15.94s) archiver.Archiver.test_archiver_mode_diff: PASSED (15.79s) archiver.Archiver.test_archiver_mode_dumpdata: PASSED (15.39s) archiver.Archiver.test_archiver_mode_mirror: PASSED (15.28s) archiver.Archiver.test_archiver_mode_mirror_combined: PASSED (21.22s) archiver.Archiver.test_archiver_mode_mirror_excludes: PASSED (15.11s) archiver.Archiver.test_archiver_mode_mirror_gitsm: PASSED (13.61s) archiver.Archiver.test_archiver_mode_mirror_gitsm_shallow: PASSED (23.21s) archiver.Archiver.test_archiver_mode_original: PASSED (14.87s) archiver.Archiver.test_archiver_mode_patched: PASSED (15.50s) archiver.Archiver.test_archiver_mode_recipe: PASSED (15.62s) archiver.Archiver.test_archiver_srpm_mode: PASSED (20.66s) oe-selftest () - Ran 15 tests in 257.170s (From OE-Core rev: 04b4e6e271c2c3e02b105edb3b0d8aae39dd3d7c) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Capture git submodules in mirror archiverPaul Barker2020-06-091-0/+54
| | | | | | | | | | Using the new Fetch.expanded_urldata() function we can get URL data for all git submodules. (From OE-Core rev: d908ca51b72f4ba417e7573ae3d953535f53286c) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Recursively patch test case pathsPaul Barker2020-06-041-2/+12
| | | | | | | | | | | This ensures that builddir is updated correctly to point to the new selftest build directory when we're given a list of test suites instead of a list of test cases. (From OE-Core rev: 56e211d0f3c6cb84f5982e5de00faeeed69c1912) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Support verbose log outputPaul Barker2020-06-042-0/+3
| | | | | | | (From OE-Core rev: 6a607da9a6aa05f86b0e77cccd066b9f286cfada) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Allow overriding the build directory used for testsPaul Barker2020-06-041-2/+8
| | | | | | | | | | This may be useful if the parent directory of the original builddir is not writable, on a lower performance drive, etc. (From OE-Core rev: dab719e5f1964fd48e9a35e6b9db1508b5414540) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix test case for srpm archiver modePaul Barker2020-06-041-0/+1
| | | | | | | | | | | We can't assume that rpm packaging will always be enabled when running oe-selftest. In particular when using nodistro instead of poky this is not enabled by default. (From OE-Core rev: 23df3024664ec56dbbe8865ef3953d2c33a7a2cb) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --offset argument for partitionsJoshua Watt2020-06-041-25/+93
| | | | | | | | | | | | | | | | | | | | Add support for an --offset argument when defining a partition. Many SoCs require that boot partitions be located at specific offsets. Prior to this argument, most WKS files were using the --align attribute to specify the location of these fixed partitions but this is not ideal because in the event that the partition couldn't be placed in the specified location, wic would move it to the next sector with that alignment, often preventing the device from booting. Unlike the --align argument, wic will fail if a partition cannot be placed at the exact offset specified with --offset. Changes in V2: * Fixed a small typo that prevented test_fixed_size_error from passing (From OE-Core rev: 467f84e12b96bc977d57575023517dd6f8ef7f29) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/targetcontrol: Rework exception handling to avoid warningsRichard Purdie2020-06-042-5/+5
| | | | | | | | | | | | | | | | We're seeing: WARNING: bitbake/lib/bb/cookerdata.py:136: ResourceWarning: unclosed file <_io.FileIO name='tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testimage/qemurunner_log.20200601181912' mode='ab' closefd=True which can only be caused by the qemu.stop() method not being called. Tweak the error handling to fix the blanket exception handler which is likely meaning this function isn't getting called. (From OE-Core rev: ee707090848d793e3b2d82dd3861ae22222682c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* apt: update to 1.8.2.1Alexander Kanavin2020-06-042-2/+2
| | | | | | | | | I took the opportunity to rewrite the recipe from scratch; there was just too much baggage in it. (From OE-Core rev: f058272de9cba188d96940c8c921cf31727fe4d1) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta-selftest: add test for .patch file with long filename and without subjectMartin Jansa2020-06-041-0/+27
| | | | | | | (From OE-Core rev: 7c3e17f34c74e838990006aaf570df501aa2c167) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta-selftest: add test of .gitignore in tarballMartin Jansa2020-06-041-0/+26
| | | | | | | (From OE-Core rev: 8ee4f7c076b0fdbfc5b9d6b5bbbf8a02f5d062a7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: fix ip fallback detectionKonrad Weihmann2020-05-301-1/+1
| | | | | | | | | | | | | | When falling back from detecting ip from /proc/./cmdline the output of runqemu is acutally 'Network configuration: ip=192.168.7.2::192.168.7.1::255.255.255.0' which doesn't match the given regex and leading to run failure, although IP is detectable. Fix regex by inserting an optional 'ip=' prefix to first IP (From OE-Core rev: 75f2471d15fab024775c59cb70c54e3f25f9ae72) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: enable virglrenderer and glx options subject to 'opengl' DISTRO_FEATUREAlexander Kanavin2020-05-271-12/+6
| | | | | | | | | | | | | | | | | | Note that to actually use accelerated GL passthrough, there are two options 1) a suitable frontend need to be also enabled - gtk+ and SDL both seem to work well. Previously I struggled to make SDL work, but now it seems fine. 2) it is also possible to render off-screen with -display egl-headless option, and see the output with a VNC viewer (for which, qemu needs to be started with a VNC server): $ runqemu kvm egl-headless publicvnc (From OE-Core rev: 662c688e635f4490aac0d6d34ce7a7b31d73f5c5) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/concurrencytest: don't delete build directory for failed testsSteve Sakoman2020-05-241-2/+8
| | | | | | | (From OE-Core rev: 3d5aa170d2e88b852bd2a4452aab9311a24badef) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testresults.json: add duration of the tests as wellAlexander Kanavin2020-05-211-1/+5
| | | | | | | | | | This is printed by testimage, but isn't actually saved. It's a useful metric for tracking execution times. (From OE-Core rev: 8fc19639f47b959a141dae231395bbababa644e1) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: declare support for wic.zstDiego2020-05-181-1/+1
| | | | | | | | | | | | | | | Declare images in wic.zst format as supported, as bmaptool now supports zstd: https://github.com/intel/bmap-tools/commit/1b8437d58447d3796dc11fd0f2c62bec5746e5d6 Given the very fast decompression speed of zstd over, for example, gzip, writing images with bmaptool can provide big write speed improvements when decompression speed is the limiting factor (especially with very sparse images). (From OE-Core rev: 704b01f33196cfdeaa57e2f2602ff2d52b25ab93) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/imagefeatures: Enable sanity test for IMAGE_GEN_DEBUGFSYeoh Ee Peng2020-05-121-0/+32
| | | | | | | | | | | | | | Add new testcase to check IMAGE_GEN_DEBUGFS. Test makes sure that debug filesystem is created accordingly. Test also check for debug symbols for some packages as suggested by Ross Burton. [YOCTO #10906] (From OE-Core rev: 727e8819df17f0f959b602e6f7b6af15993fc466) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* virgl: skip test on Debian 9Alexander Kanavin2020-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | Debian 9 has an older version of mesa, where dri drivers do not link against glapi explicitly, which causes problems when they are loaded by newer mesa-native: pokybuild@debian9-ty-2:~$ ldd -d /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so |grep undefined undefined symbol: _glapi_tls_Dispatch (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so) undefined symbol: _glapi_tls_Context (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so) compared to Debian 10: pokybuild@debian10-ty-2:~$ ldd -d /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so|grep undefined pokybuild@debian10-ty-2:~$ (From OE-Core rev: e604e9d23478a4ea8e5afa63306dd481a34c68d1) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdkext/devtool: initialize the test component's git repoAlexander Kanavin2020-05-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | Devtool is relying on externalsrc class, which, in order to determine if a rebuild is needed, relies on git to checksum files (if the component tree is a git repo), or sets a flag to always rebuild if the component tree is not a git repo. This is problematic in testsdkext scenario, where the test component is inside a build directory, which itself is inside the poky repo checkout, and listed in .gitignore. What happens is that git walks up the tree and uses the index of the poky repo. This works okay with older versions of git, but git 2.26 complains that we're inside a directory that is ignored, and returns an error. To fix the issue, the git repository is initialized directly in the component directory, just prior to running the tests. (From OE-Core rev: a5b21af4884c322be173b045ec2fad57ef76e98e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: Use libdir to run ptest-runnerAnibal Limon2020-05-021-1/+5
| | | | | | | | | | | | | In multilib build configs libs can be installed in /usr/lib{32,64,x32} so use libdir to specify the correct ptest directory along with default /usr/lib. [YOCTO #12604] (From OE-Core rev: e44ca998c27f494466a524d09f751f963ec9be20) Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: Clean up failure handlingRichard Purdie2020-04-261-3/+8
| | | | | | | | | | | | | | | If you fail to setup the tap devices, runqemu will error quickly however stdout/stderr are not shown to the user, instead a SystemExit traceback is shown. This could explain some long since unexplained failures on the autobuilder. Rework the error handling so SystemExit isn't used and the standard log failure messages can be shown. The code could likely ultimatley need some restructuring to work effectively. (From OE-Core rev: 57ccf1e3bb320bd28a2d106c98f4706434c3075a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* targetcontrol: Fix leaking log handlerRichard Purdie2020-04-261-3/+4
| | | | | | | | | | | | | | | | | | We had a mystery failure on the autobuilder where runqemu appeared to be failing as a logfile directory no longer existed. The key to reproducing was running a runqemu where the image was deleted (as devtool does), then running another runqemu test. E.g.: 'oe-selftest -r devtool.DevtoolExtractTests.test_devtool_deploy_target wic.Wic2.test_qemu_efi' This then tries to write to the logfile from the first test, the image directory was deleted and we get strange failures. The fix is to remove the logging handler when qemu is stopped. (From OE-Core rev: b59a2bbbf3c56b71f6118970ed2269dddfbdbe0c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: wic: Add more tests for include_pathRicardo Ribalda Delgado2020-04-261-1/+62
| | | | | | | | | | | | Make sure permissions are respected. Add new test for orig/destination option. Cc: Paul Barker <pbarker@konsulko.com> (From OE-Core rev: 33785be3c7eb4d5684cded08f955412a0c008929) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: wic: Add tests for permissions and change-directoryRicardo Ribalda Delgado2020-04-261-0/+90
| | | | | | | | | | | | | Make sure that the permissions and username are respected when using all the rootfs modifiers. Add tests for change-directory command Cc: Paul Barker <pbarker@konsulko.com> (From OE-Core rev: 4aad9531df44d1b0637bd559161702ad86861b46) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add test for conflicting sysroot providerRichard Purdie2020-04-261-0/+37
| | | | | | | | | | | | | | | | | | sysroot-test depends on virtual/sysroot-test which we build for one machine, switch machine, switch provider of virtual/sysroot-test and check that the sysroot is correctly cleaned up. The files in the two providers overlap so can cause errors if the sysroot code doesn't function correctly. Yes, sysroot-test should be machine specific really to avoid this, however the sysroot cleanup should also work. This adds a test for bug: [YOCTO #13702] (From OE-Core rev: 24ca62b3c1fd404b67d549b29aeeacf913e6dc86) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/package: Add test to ensure ownership is preservedDaisuke Yamane2020-04-261-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13806 Add test_preserve_ownership to selftest/package. This test creates a file, a directory and a symbolic link and changes ownership, then compares with them installed in rootfs to ensure ownership is preserved. [Test without a commit 'bitbake: lib/bb/utils.py: Preserve ownership of symlink'] | 2020-03-14 10:01:14,519 - oe-selftest - INFO - test_preserve_ownership (package.PackageTests) | 2020-03-14 10:56:44,612 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/file | 2020-03-14 10:56:44,770 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/dir | 2020-03-14 10:56:44,822 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/symlink | 2020-03-14 10:56:44,879 - oe-selftest - ERROR - Incrrect ownership /etc/selftest-chown/symlink [root:root] | 2020-03-14 10:56:45,884 - oe-selftest - INFO - ... FAIL [Test with a commit 'bitbake: lib/bb/utils.py: Preserve ownership of symlink'] | 2020-03-14 10:58:49,599 - oe-selftest - INFO - test_preserve_ownership (package.PackageTests) | 2020-03-14 11:51:39,947 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/file | 2020-03-14 11:51:40,013 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/dir | 2020-03-14 11:51:40,063 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/symlink | 2020-03-14 11:51:41,118 - oe-selftest - INFO - ... ok (From OE-Core rev: 88c1824468109d0f78d5fee7b71baa1f3944db7f) Signed-off-by: Daisuke Yamane <daisuke.yamane@cybertrust.co.jp> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/weston: Enhance weston testsYeoh Ee Peng2020-04-261-0/+50
| | | | | | | | | | | | | | | | | | | | | Existing weston test available make sure that a process for weston-desktop-shell exist when image boot up. Enhance weston tests by: - execute weston-info to make sure weston interface(s) are initialized - execute weston and make sure it can initialize a new wayland compositor (retry checking for wayland processes up to 5 times) - enable weston logging for debugging when fail to initialize wayland compositor [YOCTO# 10690] (From OE-Core rev: d06552c588bde8fc15c23d8fc2eb00a4243cbc3b) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: enable ovmf supportKonrad Weihmann2020-04-242-3/+8
| | | | | | | | | | Add support for running wic images with EFI as testimage. Introduces a variable called QEMU_USE_OVMF for configuration. (From OE-Core rev: 3af8aaff68ed332d812ea7dc184d392700ad7882) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>