aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
AgeCommit message (Collapse)Author
2018-10-12ksample.py: fix error messageChen Qi
The current error message is like: kobject-example.kodoesn't exist Add a space so that it looks like: kobject-example.ko doesn't exist Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-11oeqa/runtime/opkg: Ensure the test works on multilibRichard Purdie
After allarch was disabled in multilib, this test broke. Fix the test to account for that change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-30oeqa/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. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/runtime/ldd: Clean up testRichard Purdie
* Merge the two tests together as having them separate is pointless * Test that ldd runs correctly * Add in a dependency on the "ldd" package being installed instead of the sdk tools feature Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-19kernel-devsrc: restructure for out of tree (and on target) module buildsBruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required. This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package. This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel. The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel. The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel. Along with the changes to the copying of the infrascture, we also have the following changes: - a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make modules_prepare" - The kernel source is installed into /lib/modules/<version>/build and a symlink created from /usr/src/kernel to the new location. This aligns with the standard location for module support code - There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16runtime selftest: limit kernel hw bp archesHongzhi.Song
1. So far, only qemux86[-64] support hw breakpoint, no matter whether or not with kvm. qemuppc: The oe-core configuration uses a PPC G4 system as the default cpu but qemu doesn't simulate the hw breakpoint register for G4. qemuarm: The arch more than v7 supports hw breakpoint, however arm use v5 as default. qemuarm64: We temporarily drop qemuarm64 for the moment. Normally it will print debug info once, but endlessly when we trigger the break point. Now it is hard to located the issue, but we will confirm it later. qemumips*: Kernel dosen't support hw bp for mips. 2. Syslog maybe not started, so we use dmesg to confirm. 3. Running 'ls' to trigger the hardware breakpoint test. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16runtime selftest: test_trace_events_sample of ksample.pyHongzhi.Song
The debug info can not be written to trace buffer immediately by thread. So we should sleep some seconds. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14parselogs.py: output correct log locationChen Qi
The log entry in results is altered to remove 'target_logs'. This causes wrong log location in output. e.g. AssertionError: 1 != 0 : Log: /path/to/image/1.0-r0/postinstall.log But when user wants to check the log, the user will find the log is not present. The actual log file is /path/to/image/1.0-r0/target_logs/postinstall.log. So fix to use the correct log location. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08context.py: Do not mask exceptions needlessly.Paulo Neves
There were a lot of assumptions in the controller import code of context.py which were not true anymore. These assumptions reflected themselves by catching exceptions and re-raising them with unhelpful error messages in other parts of the code. This commit does not fix the classes controller classes that became broken after the refactor but at least it allows for the exceptions to be thrown where the imports fail, thus actually showing what exactly went wrong with the import. An example of such an improvement is that before if the controller class failed during it's init contructor the controller would just be skipped and the task would just complain it could not find the controller. Now for example, if there is a NamerError due to a variable not being declared, the user will get that report. Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-08-08oe_syslog.py: fix for syslog-ngChen Qi
When using syslog-ng as the syslog provider, oe_syslog test case fails because it cannot find the syslog daemon. This is because it greps for 'syslogd' but syslog-ng's daemon is 'syslog-ng'. So fix it to check both 'syslogd' and 'syslog-ng'. Also, when the test case fails, what I get is: | AssertionError: 1 != 0 : No syslogd process; ps output: <empty here> This does not help user. The output is actually from the 'PS | GREP' command. And when the 'PS | GREP' command fails, the output is always empty. So also fix this problem. After the change, it looks like: | AssertionError: False is not true : No syslog daemon process; ps output: | PID USER VSZ STAT COMMAND | 1 root 16476 S {systemd} /sbin/init | 2 root 0 SW [kthreadd] | 3 root 0 IW [kworker/0:0] ... Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31systemd.py: increase default bus timeoutChen Qi
Use SYSTEMD_BUS_TIMEOUT to set default timeout to 240s to avoid timeout problem on slow qemu machines. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-07-31parselogs.py: ignore network interface name changing failureChen Qi
The following error from systemd-udevd is not harmful. It's just because our qemu targets are using eth0. Error changing net interface name 'eth0' to 'enp0s3': Device or resource busy Note that systemd is using a different network interface naming scheme from traditional ethX naming scheme. To make this error message go away, we could symlink /etc/udev/rules.d/80-net-setup-link.rules to /dev/null to recover traditional naming scheme. But I'm not sure if this will cause regression in user experience for systemd users of OE. So just ignore this error message so that parselogs.py test case does not fail. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-07-31oe_syslog.py: fix settings in OEHasPackage decoratorChen Qi
1. For test_syslog_running, we should not restrict it to run for only busybox-syslog and sysklogd. So extend it to all syslog providers in oe-core and meta-openembedded. 2. For test_syslog_startup_config, fix to make it depend on the existence of busybox-syslog. The previous condition "!sysklogd && busybox" is incorrect, because busybox may be compiled without syslog support, and sysklogd and busybox-syslog conflict with each other. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-07-30oeqa/runtime/scanelf: removeRoss Burton
These tests are intended to search for bad RPATHs and text relocations, but we do these tests at buildtime and as pax-utils is never installed in any default images the tests are never executed. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26oeqa: 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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18oeqa/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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18oeqa/parselogs: remove references to BSPs that no longer existAnuj Mittal
These platform specifc BSPs were removed from meta-intel and superseded by intel-core* BSPs. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05oeqa/runtime/cases/parselog.py: ignore a message from westonChen Qi
The following error message when starting core-image-weston is not critical as long as the image could start up correctly. So extend the common_errors list for parselog.py test case to ignore this message. logind: cannot setup systemd-logind helper (-61), using legacy fallback [YOCTO #12835] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-02oeqa/runtime: Add testcases for kernel sampleHongzhi.Song
We are going to let runtime test support kernel tests. Now we just add kernel self-contained sample tests. And we plan to add overall kernel tests in the future. This patch is just add kernel samples test which contains about 13 tests enabled by kernel-sample.scc. So it needs statement, KERNEL_FEATURES_append += " features/kernel-sample/kernel-sample.scc" in local.conf. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18oeqa/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. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18oeqa/runtime/cases/parselogs.py: ignore a message from watchdogChen Qi
The following message from watchdog is not an error. "error retry time-out = 60 seconds" Checking watchdog's source codes, we have: src/watchdog.c: log_message(LOG_INFO, "error retry time-out = %d seconds", retry_timeout); It's clear this is an info message, so parselogs should ignore it. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18oeqa/runtime/cases/parselogs.py: extend common_errors listChen Qi
Add the following line to common_errors list. Failed to read /var/lib/nfs/statd/state: Success This message is not harmful, it does not result in rpc.statd starting failure. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-07oeqa/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>
2018-06-07oeqa: 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. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04oeqa/runtime/cases/multilib.py: fix test_file_connman skipping logicChen Qi
The test_file_connman should be executed only when 'lib32-connman' is installed and 'connman' is not installed. When lib32-connman and connman are both installed, the /usr/sbin/connmand could be from connman or lib32-connman, depending on the installation order. What we want to check is the connmand command from lib32-connman, so we need to make sure that connman is not there to cause chaos. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04oeqa/runtime/cases/multilib.py: skip if needed packages are not availableChen Qi
1) The test cases use 'readelf' command to do the check. This command is from binutils. So skip the test if the needed binutils package is not installed. The related error message in log.do_testimage is like below. Output: sh: readelf: not found 2) The test case tests /lib/libc.so.6 from lib32-libc6. So skip the test if lib32-libc6 is not installed. The related error message in log.do_testimage is like below. Output: readelf: Error: 'lib/libc.so.6': No such file Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04oeqa/runtime/cases/rpm.py: skip if rpm not availableChen Qi
This test case should only run when rpm package is installed. So skip it if rpm package is not installed. This fixes: RESULTS - rpm.RpmBasicTest.test_rpm_help - Testcase 1059: FAILED Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-14runtime/dnf: Add new dnf test casesJose Perez Carranza
Add test cases to test “exclude” and “installroot“ options, also modify the logic of filtering packages on the feed to have all the packages needed by the tests. [YOCTO #10744] Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-04oeqa/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. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-04logrotate: update to 3.14.0Yi Zhao
Since the wtmp and btmp definitions had been moved from logrotate.conf to logrotate.d in this release, we also need to install them to /etc/logrotate.d/. Also update oeqa runtime logrotate test case. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-18oeqa/runtime/stap.py: add runtime test for systemtapVictor Kamensky
Add runtime test for stap to test basic SystemTap operations: can compile very basic module and run on target device. Note we disable (-DSTP_NO_VERREL_CHECK) SystemTap additional kernel release check since during OE testing mismatching kernel-devsrc and kernels are used. Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-30make-mod-scripts/kernel-devsrc: Fix objtool issuesRichard Purdie
Kernels which use tools/objtool can now fail when building external modules due to objtool being missing, the generated files can also cause problems for kernel-devsrc. Ensure objtool is generated in make-mod-scripts by also calling "make prepare". For devsrc, delete the generated binaries since they'd be native binaries and unsuitable for the target. The oeqa kernel module tests also need to have the additional "make prepare" step added. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04oeqa/runtime/opkg.py: add runtime test for opkgYeoh Ee Peng
Add runtime test for opkg to test that it can install ipk package from remote source. [YOCTO# 11488] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-04oeqa/runtime/apt.py: add runtime test for aptYeoh Ee Peng
Add runtime test for apt to test that it can install deb package from remote source. [YOCTO# 11488] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-29oeqa/runtime: add gobject-introspection testRoss Burton
(From OE-Core rev: 497a95b576e19e39e20ac280d0db24f51b7c9679) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06oeqa/runtime/buildcpio: Use our own mirror for sourceRichard Purdie
We see occasional network glitches which break this test. Use our own mirror (which has a .gz instead of .bz2) to avoid the errors, we're not trying to test network connectivity. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-05runtime/cases/ptest.py: fail when ptests fail on targetAlexander Kanavin
That's the whole point isn't it? Previously this testcase succeeded even if some of the underlying on-target tests failed; the only way to find out if anything was wrong was to manually inspect the logs. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-05runtime/cases/ptest.py: do not require ptest-pkgs in IMAGE_FEATURES; run ↵Alexander Kanavin
only when ptest-runner is availalble; Previously the test would execute only when all available ptests for packages in the image were installed; some of those tests may be broken, never finish, take a very long time or simply irrelevant to the user who wants to check ptests of only a few specific packages, and does so by listing them explicitly via IMAGE_INSTALL_append or similar. Presence of ptest-runner means there is at least one ptest package installed as they pull it in via a class dependency; ptest-runner is not generally installed otherwise. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23runtime/cases/_ptest.py: rename it to ptest.pyRobert Yang
It works now. [YOCTO #11547] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23runtime/cases/_ptest.py: add skip statusRobert Yang
The packages' test cases maybe skipped, check and save them. [YOCTO #11547] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23runtime/cases/_ptest.py: revive itRobert Yang
* Make it work with current oeqa * Skip the test if ptest is not in DISTRO_FEATURES * Skip the test if ptest-pkgs is not in IMAGE_FEATURES * The logs are saved to: testimage/ptest_log -> testimage/ptest_log.<datetime> * This provides data that could be used to detect regressions in ptest results [YOCTO #11547] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23oeqa/parselogs: Ignore device node warnings on mipsRichard Purdie
THe newner kernels have ope firmware support enabled which leads to warnings during boot on mips. These aren't interesting and we should ignore them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08oeqa/runtime: Replace buildiptables for buildlzip on runtime testsJose Perez Carranza
Buildiptables test cases are conflicting with images built with “musl” as standard C library, in order to avoid those issues lzip package was selected to be used on the tests as this does not have any "musl" dependency. This patch is applicable for testimage tests [YOCTO # 11713] Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-05oeqa/runtime/context.py: Add support to specify port in target_ipAníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-30oeqa/runtime/case: Don't use OEQA framework internal methodsAníbal Limón
The OEQA framework has internal methods for provide functionality in decorators so Test components aren't expected to override it. Use the base unittest methods for setUp and tearDown. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-10parselogs: whitelist failed to enable keyboard error on intel-corei7-64California Sullivan
This error is seen on the Braswell RVP platform we have been using for testing. The error is caused by atkbd.c keyboard driver, which is only for AT and PS/2 keyboards. I tested a PS/2 keyboard with the board, which worked fine, and the board does not have a separate AT connector, so this error won't cause any functional issues. [YOCTO #10110]. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-10parselogs: whitelist bluetooth firmware load error for intel-corei7-64California Sullivan
The NUC6 has issues bringing up Bluetooth early in the boot sequence. We see: [ 4.091790] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [ 4.097326] Bluetooth: hci0: Found device firmware: intel/ibt-11-5.sfi [ 4.145317] Bluetooth: hci0: Failed to send firmware data (-38) Followed by this later on: [ 11.509870] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [ 11.509988] Bluetooth: hci0: Found device firmware: intel/ibt-11-5.sfi [ 13.090308] Bluetooth: hci0: Waiting for firmware download to complete [ 13.090829] Bluetooth: hci0: Firmware loaded in 1549114 usecs [ 13.090987] Bluetooth: hci0: Waiting for device to boot [ 13.101958] Bluetooth: hci0: Device booted in 10818 usecs Bluetooth does successfully come up and the firmware is loaded. This behavior is consistent across all kernels I've tested. [YOCTO #10628]. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-06oeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdirJoshua Lock
Rather than hard-coding the tmpdir for TargetBuildProject to /tmp allow the parent's default handling to define an appropriate tmpdir. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05runtime/dnf : Add ID to the dnf test casesJose Perez Carranza
Add the corresponding Testopia ID to the test cases for dnf Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31oeqa/runtime/cases: Migrate underscore casesMariano Lopez
There were two missing cases to be migrated to the new framework: _qemutiny and _ptest. qemutiny was straightforward. ptest on the other hand wasn't working even in previous releases; it has been migrated from smart to dnf, and how ptest packages are gathered to be installed, adapted to use unicode, and removed a lot of code that wasn't needed anymore. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>