aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-03-25resulttool/report: Handle missing metadata sections more cleanlyRichard Purdie
Currently some older results files cause the code to give tracebacks. Handle these missing sections more cleanly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25resulttool/store: Handle results files for multiple revisionsRichard Purdie
Currently we cant store results if the results files span multiple different build revisons. Remove this limitation by iterating. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25resulttool/resultutils: Avoids tracebacks for missing logsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25resulttool: Improvements to allow integration to the autobuilderRichard Purdie
This is a combined patch of the various tweaks and improvements I made to resulttool: * Avoid subprocess.run() as its a python 3.6 feature and we have autobuilder workers with 3.5. * Avoid python keywords as variable names * Simplify dict accesses using .get() * Rename resultsutils -> resultutils to match the resultstool -> resulttool rename * Formalised the handling of "file_name" to "TESTSERIES" which the code will now add into the json configuration data if its not present, based on the directory name. * When we don't have failed test cases, print something saying so instead of an empty table * Tweak the table headers in the report to be more readable (reference "Test Series" instead if file_id and ID instead of results_id) * Improve/simplify the max string length handling * Merge the counts and percentage data into one table in the report since printing two reports of the same data confuses the user * Removed the confusing header in the regression report * Show matches, then regressions, then unmatched runs in the regression report, also remove chatting unneeded output * Try harder to "pair" up matching configurations to reduce noise in the regressions report * Abstracted the "mapping" table concept used to pairing in the regression code to general code in resultutils * Created multiple mappings for results analysis, results storage and 'flattening' results data in a merge * Simplify the merge command to take a source and a destination, letting the destination be a directory or a file, removing the need for an output directory parameter * Add the 'IMAGE_PKGTYPE' and 'DISTRO' config options to the regression mappings * Have the store command place the testresults files in a layout from the mapping, making commits into the git repo for results storage more useful for simple comparison purposes * Set the oe-git-archive tag format appropriately for oeqa results storage (and simplify the commit messages closer to their defaults) * Fix oe-git-archive to use the commit/branch data from the results file * Cleaned up the command option help to match other changes * Follow the model of git branch/tag processing used by oe-build-perf-report and use that to read the data using git show to avoid branch change * Add ptest summary to the report command * Update the tests to match the above changes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25scripts/resulttool: enable manual execution and result creationMazliana
Integrated “manualexecution” operation to resulttool scripts. Manual execution script is a helper script to execute all manual test cases in baseline command, which consists of user guideline steps and the expected results. The last step will ask user to provide their input to execute result. The input options are passed/failed/blocked/skipped status. The result given will be written in testresults.json including log error from the user input and configuration if there is any.The output test result for json file is created by using OEQA library. The configuration part is manually key-in by the user. The system allow user to specify how many configuration they want to add and they need to define the required configuration name and value pair. In QA perspective, "configuration" means the test environments and parameters used during QA setup before testing can be carry out. Example of configurations: image used for boot up, host machine distro used, poky configurations, etc. The purpose of adding the configuration is to standardize the output test result format between automation and manual execution. To use these scripts, first source oe environment, then run the entry point script to look for help. $ resulttool To execute manual test cases, execute the below $ resulttool manualexecution <manualjsonfile> By default testresults.json store in <build_dir>/tmp/log/manual/ [YOCTO #12651] Signed-off-by: Mazliana <mazliana.mohamad@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25resulttool: enable merge, store, report and regression analysisYeoh Ee Peng
OEQA outputs test results into json files and these files were archived by Autobuilder during QA releases. Example: each oe-selftest run by Autobuilder for different host distro generate a testresults.json file. These scripts were developed as a test result tools to manage these testresults.json file. Using the "store" operation, user can store multiple testresults.json files as well as the pre-configured directories used to hold those files. Using the "merge" operation, user can merge multiple testresults.json files to a target file. Using the "report" operation, user can view the test result summary for all available testresults.json files inside a ordinary directory or a git repository. Using the "regression-file" operation, user can perform regression analysis on testresults.json files specified. Using the "regression-dir" and "regression-git" operations, user can perform regression analysis on directory and git accordingly. These resulttool operations expect the testresults.json file to use the json format below. { "<testresult_1>": { "configuration": { "<config_name_1>": "<config_value_1>", "<config_name_2>": "<config_value_2>", ... "<config_name_n>": "<config_value_n>", }, "result": { "<testcase_namespace_1>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, "<testcase_namespace_2>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, ... "<testcase_namespace_n>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, } }, ... "<testresult_n>": { "configuration": { "<config_name_1>": "<config_value_1>", "<config_name_2>": "<config_value_2>", ... "<config_name_n>": "<config_value_n>", }, "result": { "<testcase_namespace_1>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, "<testcase_namespace_2>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, ... "<testcase_namespace_n>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, } }, } To use these scripts, first source oe environment, then run the entry point script to look for help. $ resulttool To store test result from oeqa automated tests, execute the below $ resulttool store <source_dir> <git_branch> To merge multiple testresults.json files, execute the below $ resulttool merge <base_result_file> <target_result_file> To report test report, execute the below $ resulttool report <source_dir> To perform regression file analysis, execute the below $ resulttool regression-file <base_result_file> <target_result_file> To perform regression dir analysis, execute the below $ resulttool regression-dir <base_result_dir> <target_result_dir> To perform regression git analysis, execute the below $ resulttool regression-git <source_dir> <base_branch> <target_branch> [YOCTO# 13012] [YOCTO# 12654] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-24lttng-tools: update to 2.9.11Jonathan Rajotte-Julien
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-24lttng-modules: update to 2.10.9Jonathan Rajotte-Julien
Pertinent fix for OE-Core since 2.10.6: Fix: out of memory error handling Fix: access migrate_disable field directly Prevent allocation of buffers if exceeding available memory 2.10.9 also contains the necessary fix to support kernel up to 5.0. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-24lttng-ust: update to 2.10.3Jonathan Rajotte-Julien
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-24coreutils: 8.29: fix native buildStefan Müller-Klieser
This fixes the native build on glibc 2.28 hosts, by backporting two gnulib patches from master. Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-24busybox: backport fix for issues introduced by CVE-2011-5325.patchMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-22logrotate.py: restore /etc/logrotate.d/wtmpMingli Yu
During the test logrotate.LogrotateTest.test_1_logrotate_setup, there is below logic: # mkdir $HOME/logrotate_dir # sed -i "s#wtmp {#wtmp {\n olddir $HOME/logrotate_dir#" /etc/logrotate.d/wtmp After all logrotate.LogrotateTest finished, only cleanup $HOME/logrotate_dir as below, but don't restore the config file /etc/logrotate.d/wtmp. [snip] def tearDownClass(cls): cls.tc.target.run('rm -rf $HOME/logrotate_dir') [snip] That's to say, there is one additional line added to /etc/logrotate.d/wtmp and will make the logrotate service start failed when run systemd.SystemdBasicTests.test_systemd_failed Take an example as below when run test as root: # cat /etc/logrotate.d/wtmp # no packages own wtmp -- we'll rotate it here /var/log/wtmp { olddir /root/logrotate_dir missingok monthly create 0664 root utmp minsize 1M rotate 1 } # ls /root/logrotate_dir ls: cannot access '/root/logrotate_dir': No such file or directory # systemctl start logrotate Job for logrotate.service failed because the control process exited with error code. See "systemctl status logrotate.service" and "journalctl -xe" for details. # systemctl status logrotate logrotate.service - Rotate log files Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset> Active: failed (Result: exit-code) since Wed 2019-02-13 03:35:19 UTC; 7s ago Docs: man:logrotate(8) man:logrotate.conf(5) Process: 540 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE) Main PID: 540 (code=exited, status=1/FAILURE) Feb 13 03:35:18 qemumips systemd[1]: Starting Rotate log files... Feb 13 03:35:19 qemumips logrotate[540]: error: wtmp:9 error verifying olddir path /root/logrotate_dir: No such file or directory Feb 13 03:35:19 qemumips logrotate[540]: error: found error in file wtmp, skipping Feb 13 03:35:19 qemumips systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Feb 13 03:35:19 qemumips systemd[1]: logrotate.service: Failed with result 'exit-code'. Feb 13 03:35:19 qemumips systemd[1]: Failed to start Rotate log files. Add the logic to restore /etc/logrotate.d/wtmp to make the cleanup complete to fix the above issue. (From OE-Core rev: a2db9320d97d12d87524ff16a329f9c38a8da33f) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-22systemd: fix CVE-2019-6454George McCollister
Apply patches from systemd_237-3ubuntu10.13 to fix CVE-2019-6454. CVE-2019-6454 is an issue in which systemd (PID1) can be crashed with a specially formed D-Bus message. For information see: https://usn.ubuntu.com/3891-1/ https://git.launchpad.net/ubuntu/+source/systemd/commit/?h=applied/ubuntu/bionic-updates&id=d7584b894afcaa8a4a1abb69db2a9c81a6276e80 Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: fix CVE-2018-6954George McCollister
Apply patches to fix CVE-2018-6954 NVD description from https://nvd.nist.gov/vuln/detail/CVE-2018-6954 systemd-tmpfiles in systemd through 237 mishandles symlinks present in non-terminal path components, which allows local users to obtain ownership of arbitrary files via vectors involving creation of a directory and a file under that directory, and later replacing that directory with a symlink. This occurs even if the fs.protected_symlinks sysctl is turned on. Patches from systemd_237-3ubuntu10.13.debian. These patches shouldn't be required on newer OE releases since they use systemd v239 or higher. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: Security fix CVE-2018-16866Marcus Cooper
Affects < v240 Signed-off-by: Marcus Cooper <marcusc@axis.com> >From v2 patch on openembedded-core@lists.openembedded.org Incresed file name number from 0026 to 0027. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: Security fix CVE-2018-16865George McCollister
Affects < v240 Based on thud commit d5d2b821fc85b8cf39f683061ac2a45bddd2139f The second patch in the thud commit doesn't apply against 237. Use the version of the second patch CVE-2018-16865_2.patch from systemd_237-3ubuntu10.13.debian. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: Security fix CVE-2018-16864George McCollister
Affects < v240 Based on thud commit 403e74b07b6f3c4a2444e68c74a8434fb17aee49 The patch in the thud commit doesn't compile against 237. Use the version of this patch, CVE-2018-16864.patch from systemd_237-3ubuntu10.13.debian. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: fix CVE-2018-15688Chen Qi
Backport patch to fix the following CVE. CVE: CVE-2018-15688 Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from thud 13591d7224393dc0ae529a03cdf74aceb3540ce9 Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: fix CVE-2018-15687George McCollister
Backport patch to fix the following CVE. CVE: CVE-2018-15687 Based on thud commit eeb621aa19f690971caf862290a172a115578ba1 The patch in the thud commit doesn't compile against 237. Use the version of this patch, CVE-2018-15687.patch from systemd_237-3ubuntu10.13.debian. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: fix CVE-2018-15686Chen Qi
Backport patch to fix the following CVE. CVE: CVE-2018-15686 Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from thud 0ef70603bc983315eb0e8a97958d995a31198c35 Signed-off-by: George McCollister <george.mccollister@gmail.com>
2019-03-22systemd: Fix typo in root home variable.ROGEZ Matthieu
This regression has been introduced while upgrading to version 237 (commit 906230a73b3ccfa4afd2a19a6b0aa18cd1d5fa08) and seems to only affect sumo version. Signed-off-by: Matthieu Rogez <matthieu.rogez@fivesgroup.com>
2019-03-22oeqa/runtime/dnf: Fix test error when static libs are enabledRichard Purdie
The test works by excluding curl-dev which curl-staticdev depends upon. When static libraries aren't disabled, this leads to an odd looking test failure. Simply exclude curl-staticdev as well in case its enabled to make sure the test always works. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-22run-postinsts: for dpkg/opkg, do not rely on /etc/*-postinstsStefan Agner
Start opkg/dpkg as soon as the respective package managers status file is present, no matter whether /etc/$pm-postinsts exists. This decouples the implicit link between postinsts scripts in /etc and the package manager: Currently the package manager is only started if those scripts are present, although the package manager does not use those scripts at all! Package managers install their own set of postinst scripts. The behavior when using rpm packages stays the same. Note that using the package managers capability to execute postinst scripts is preferred for good reasons: It makes sure that the package managers database reflects that the packages have been completely installed and configured. This change allows to drop installation of the postinsts scripts when package management is present. This will be done in a separate change. Note: Before commit 5aae19959a44 ("rootfs.py: Change logic to unistall packages") rootfs.py did not install /etc/$pm-postinsts when package management is installed! The change caused YOCTO #8235 which lead to the behavior change of run-postinsts in first place. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25package_rpm/archiver: Apply bandaid to src.rpm creationRichard Purdie
| error: create archive failed on file /media/build1/poky/build/tmp/work/all-poky-linux/xcursor-transparent-theme/0.1.1+gitAUTOINC+23c8af5ba4-r0/deploy-sources/allarch-poky-linux/xcursor-transparent-theme-0.1.1+gitAUTOINC+23c8af5ba4-r0/xcursor-transparent-theme-0.1.1+git0+23c8af5ba4-r0.src.rpm: cpio: read failed - No such file or directory | Building target platforms: noarch-poky-linux | Building for target noarch-poky-linux This is caused by: $ cat log.task_order do_cleansstate (24289): log.do_cleansstate.24289 do_deploy_archives_setscene (24395): log.do_deploy_archives_setscene.24395 do_fetch (24407): log.do_fetch.24407 [..] do_package_write_rpm (25448): log.do_package_write_rpm.25448 do_package_qa (25451): log.do_package_qa.25451 So do_deploy_archives can run from sstate, created a .src.rpm in WORKDIR/deploy-sources, then it was removed when rpm was running. This leads to a broken Source line in the spec file as the original file was found by the os.listdir(). This fix is just a bandaid over much more fundamental problems sadly. (From OE-Core rev: a10020ace4c3cd863c782760f7cbecea557ec6e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25archiver/package_rpm: Fix the worst src.rpm generation raceRichard Purdie
The package_rpm code is writing outside the task's sstate directory into the sstate of do_deploy_archives. This is "out of spec" since if the task is installed from sstate, the files are not restored. This means the files may appear/disappear, things are not deterministic and there are races. Extend the do_package_write_rpm code to handle writing the src.rpm into place to avoid these issues. There are other problems but this avoids races around this file. (From OE-Core rev: c6e151ba7fe0f14044537cf0ab2cac436f1496e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25libtool-cross: Handle ccache sstate 'infection' issuesRichard Purdie
On a system without ccache, f you: INHERIT += "ccache" bitbake libtool-cross <remove INHERIT> bitbake apmd then it fails due to being unable to find ccache. The references to ccache are coded into libtool-cross but the sstate checksum doesn't reflect this due to the way the class is coded (output should be the same regardless). The simplest solution is to remove references to ccache from the libtool script. The output then works regardless of whether ccache is present or not. The libtool-cross script is only used in a handful of cases (most of the time its dynamically generated by autoconf) so any performance issue is minor. (From OE-Core rev: ed550a49d2114c56e5bc033ecd0e83073d2d4067) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25libtool: Fix patch status tagRichard Purdie
(From OE-Core rev: 28fc470e5e10ee9cce893d037ed5e518bc5612f5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25libtool: Fix problem with libtoolize in multilib installationsRichard Purdie
Without this patch /usr/bin/libtoolize is different for each multilib since their host-triplets are different, despite there being no difference in the functionality of libtoolize itself. This change just patches out the problematic line since its just a comment for the user in help text. Ugly but solves the problem. This fixes issues where libtool and libXX-libtool couldn't be installed into the same system. (From OE-Core rev: f70040fd3ca3508d33ed24c749c0b8095b020dab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25multilib_script: Add support for multilib scriptsRichard Purdie
Whilst the package managers handle multilib ELF binaries well, they don't handle scripts in the *bindir directories well. This adds support for marking these up so that they can be handled using update-alternatives. Its done this way so that non-multilib systems don't see any changes and there is standardisation amongst the multilibs on how the alternatives are named and prioritiesd. The priotitisation code needs to be added but this change means there is somewhere to add it. Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g. MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2" to indicate which script files to process from which packages. libtool is used a as a reference to stop the libtool scripts conflicting in a multilib case and allows the kernel-devsrc change to be merged. (From OE-Core rev: 18e837433d07cfdce4019c13f682c6676425a2ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25image_types: use cpio-native to build cpio imagesRoss Burton
As per the previous commit, upstream cpio has a bug which means it crashes on append. If the image being built has already had testimage ran then cpio-native will be in the sysroot. It's also possible that some distributions are shipping this broken CVE patch too. Now that our cpio-native is fixed, until we can be sure that the host cpio isn't broken depend on cpio-native if building a cpio image. [ YOCTO #13042 ] (From OE-Core rev: c3b9aedcbe538d7fa74bd814644b4899769dec46) (From OE-Core rev: a75eba71145efa1c3d206c5e5c00608a50f013bc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25cpio: fix crash when appending to archivesRoss Burton
The upstream fix for CVE-2016-2037 introduced a read from uninitialized memory bug when appending to an existing archive, which is an operation we perform when building an image. (From OE-Core rev: 046e3e1fca925febf47b3fdd5d4e9ee2e1fad868) (From OE-Core rev: 2ff6ab2e2944c6a53523b4b1611e1d22f6393500) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oe-selftest: devtool: Support meta being a symbolic linkPeter Kjellerstedt
oe-selftest's devtool tests have been broken since commit 2457cd57 (oe-selftest: devtool: avoid parallel races by using temporary copy of core) if meta is a symbolic link. (From OE-Core rev: daba6c5a991b370709d17e51305334f55a3858ec) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oe-selftest: devtool: avoid parallel races by using temporary copy of corePaul Eggleton
Some of the devtool tests make changes to files under meta/ - legitimately since we want these tests to be working with real recipes and associated files. Unfortunately with the new oe-selftest parallelisation this can break other tests if files go missing at the wrong time (among other scenarios). To avoid this issue, simply take a copy of the core repository and use that for these tests. (We copy the entire repository since changing the path of meta/ influences COREBASE and thus we need to have things like scripts/ alongside as well). (From OE-Core rev: 2457cd57b4195924ef127f497efa2f34f411e660) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25Only add uninative and checksum if inherited uninative classJeremy Puhlman
The checksum value is only calculated if the uninative class is inherited, so check for inherit before adding it to local.conf (From OE-Core rev: 3b5b832589d943700b273e3a4d83561be0c47f36) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/utils/httpserver: Rework to avoid hangs and improve loggingRichard Purdie
testimage.bbclass installs a SIGTERM handler which conflicts with the use of multiprocessing here. This is paritcularly problematic if the http service is terminated before its started and hence before its had a chance to reset the default signal handler (as the code was written). Instead, temporarily remove testimage's handler whilst forking the http process which means the correct handler is installed and won't deadlock. Also take the opportunity to add in some log messages about the server start and shutdown so that future debugging is easier and its clearer what the code is doing. (From OE-Core rev: cc0471439aa0085ca87deccf061c5b676ef12388) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/runtime/dnf: Make sure test_dnf_install does not skippedYeoh Ee Peng
During debugging dnf issue, we found that the test_dnf_install PASSED the testing even though the environment does not allow dnf install to run successfully. Further debugging had identified that current test_dnf_install will execute dnf install even when the package to be installed already exist, thus dnf install will just skipped and this test will PASSED even though it was not. To solve this, added additional logic to check if the package to be installed already exist, if yes then remove the package before actually run dnf install. This will make sure dnf install was tested as expected. (From OE-Core rev: 4f662b253f7313c4e02bfafb527cdac076b6309a) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25perl: add testdepends for sshArmin Kuster
fixes: DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.4 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; perl -e '$_="Uryyb, jbeyq"; tr/a-zA-Z/n-za-mN-ZA-M/;print' | DEBUG: time: 1548816904.4024463, endtime: 1548817204.397057 | DEBUG: Partial data from SSH call: ssh: connect to host 192.168.7.4 port 22: Connection refused for master/thud/sumo Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa: rationalise Perl testsRoss Burton
As with the Python test, this can be both better and faster. No need to copy a file, just run a one-liner. (From OE-Core rev: c6eef46747fe58bb2310be4f06d2fa9b67901d72) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/utils/buildproject: Only clean files if we've done somethingRichard Purdie
We should only be wiping out things on target if the tests have actually run. (From OE-Core rev: d38c3eac0a5a1a9b0eb98385832e92f48145655e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is setRobert Yang
(From OE-Core rev: 564de3681353fe8e203425388e8be9703a89d2da) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/qemu & runtime: qemu do not need ip input from externalYeoh Ee Peng
Qemu do not use the ip input from external. It will retrieve ip from QemuRunner instance and assign ip value. (From OE-Core rev: 14d99dc6c39c963ba3e0d9a30274846bd5369210) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/runtime/cases: Improve dependencies of kernel/gcc/build testsRichard Purdie
Mark up these tests as needing a compiler, make and kernel source code as appropriate, the image feature requirements can then be retired. (From OE-Core rev: 9f64e6c25abdf494fb511e9cd401f8dcaa08be2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/runtime/cases: Improve test dependency informationRichard Purdie
Add the OEHasPackage decorator to a variety of tests so they determine automatically if they should run against a given image. To ensure tests can do this we need to move target operations such as scp commands into the tests and out of the class startup/teardown. (From OE-Core rev: 60d6580b85714b8960a964e775d76a7f937f5e5a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/runtime/python: clean up Python testRoss Burton
Currently this is three test cases: 1) test_python_exists. Fail if python3 isn't in PATH. 2) test_python_stdout. Run a Python script and check the output is as expected 3) test_python_testfile. Check that a file test_python_stdout wrote to exists. (1) should be a setup and skip the test module if it isn't present. (2) and (3) should be merged, there's no point copying over a two line Python file, and the test doesn't verify that the file doesn't exist in the first place. Rewrite the test to check that Python is present in a class setup so the entire test is skipped if it isn't and do some simple rot13 to verify that bytecode is being executed correctly. (From OE-Core rev: a35be5f32b4fe70b18ac1e2eccfd94558cecfbba) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/runtime/cases/python: use python 3 rather than python 2Alexander Kanavin
For example, core-image-sato skipped the test alltogether, as it no longer pulls in Python 2.x at all. (From OE-Core rev: 5ad0fe9ac6b6362011a17afaa7bee8e788093915) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25runqemu-gen-tapdevs: Allow run --help without sudoRobert Yang
Then we can get user's UID and GID rather than hardcode to 1000, e.g.: - Without sudo $ runqemu-gen-tapdevs --help [snip] $ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin [snip] - With sudo $ sudo ../poky/scripts/runqemu-gen-tapdevs --help [snip] $ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin [snip] (From OE-Core rev: 446e7da7e56f9de3602498b5ef40e9e0f8f71837) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25runqemu: clean up subprocess usageRoss Burton
Where possible pass lists instead of strings, don't use a subshell, and call check*() instead of using Popen directly. (From OE-Core rev: d2374623444752af1ad748ed36b68ea58f629bf6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa/runtime/cases/rpm.py: change to use base-passwd-docChen Qi
The test cases assume that rpm-doc is built out, as it says it its comment. This is not always true. And it sometimes results in following error. | cls.tc.target.copyTo(test_file, dst) | UnboundLocalError: local variable 'test_file' referenced before assignment Change to use base-passwd-doc, as this package is more likely to be built out than rpm-doc. (From OE-Core rev: 2e23543b48921182307065c1fa9e8b9d7fbb3cdc) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa: replace Alex Kanavin's @intel email address with a personal oneAlexander Kanavin
As I will be leaving Intel, this address will no longer be valid, so swap it for my personal one for now. (From OE-Core rev: ea58ff101e28dfda3410de66d775df3d8a1e5a96) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25oeqa: make it work for multiple usersRobert Yang
There are failures when multiple users run oe-selftest on the same host: PermissionError: [Errno 13] Permission denied: '/tmp/oe-saved- tests/201812250324_qemu' This is because /tmp/oe-saved-tests was created by user A, while user B tries to write data in it, then the error will happen. This patch can fix the problem. Move the dumped data to ${LOG_DIR}/runtime-hostdump/ rather than /tmp/oe-saved-tests/ to fix the problem. (From OE-Core rev: e219fe5329599cd6c3682f521eaee3852a2c8980) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>