summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
AgeCommit message (Collapse)Author
2020-09-28oeqa/runtime : add test for RTC(Real Time Clock)Teoh Jay Shen
This test is checking the functionality of the RTC(Real Time Clock). The Check_if_RTC_(Real_Time_Clock)_can_work_correctly manual test case from oeqa/manual/bsp-hw can be replace by this runtime test. Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-14oeqa/runtime: add test for matchbox-terminalTeohJayShen
This test is checking that the terminal application is able to run. The click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw can be replace by this runtime test. Signed-off-by: TeohJayShen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-14oeqa/weston: Fix tests to run with systemdKhem Raj
Currently, weston tests fail when using systemd, fix it by providing transient unit file and inject it via systemd-run, which generates a service file automatically and launches another weston instance to test if it can launch a nested instance. Use systemctl stop to end the service and cleanup, instead of brutal kill Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28oeqa/multilib: un-skip the connman testAlexander Kanavin
It was previously skipped as it was expecting plain connman to not be in the image, and for core-image-sato connman is always there. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28oeqa/multilib: rework to use readelf from the hostAlexander Kanavin
It is difficult and error-prone to ensure binutils gets installed into target images where this test may run; on the other hand readelf is always present on the host, as it is a part of HOSTTOOLS. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28oeqa/x32lib: rework to use readelf from the hostAlexander Kanavin
It is difficult and error-prone to ensure binutils gets installed into target images where this test may run; on the other hand readelf is always present on the host, as it is a part of HOSTTOOLS. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-18buildcpio.py: Apply patch to fix build with -fno-commonKhem Raj
This sed expression implements the needed patch to fix compilation with -fno-common, hopefully this patch will get included in 2.14 release and we can remove this operation Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06ltp: make copyFrom scp command non-fatalMatthew
[YOCTO #13802] Make the scp failure non-fatal so the ltp tests continue to run and the rest of the logs will be available to see afterwards. Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-03logrotate.py: fix testimage occasionally failureChangqing Li
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. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-23oeqa/runtime/cases/ptest: Make output content path absoluteAndrej Valek
The output content is created in current directory, because json content has no defined absolute path to WORKDIR as in bitbake. 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>
2020-06-17oeqa/runtime: Add OERequirePackage decoratorKonrad Weihmann
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 Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-03apt: update to 1.8.2.1Alexander Kanavin
I took the opportunity to rewrite the recipe from scratch; there was just too much baggage in it. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-02oeqa/runtime: Use libdir to run ptest-runnerAnibal Limon
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] Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-25oeqa/runtime/weston: Enhance weston testsYeoh Ee Peng
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] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24parselogs.py: ignore pulseaudio startup warning messagesChangqing Li
If set default syslog to rsyslog, we can see below messages in user.log, [pulseaudio] authkey.c: Failed to open cookie file [pulseaudio] authkey.c: Failed to load authentication key They are only warnings when cookie file is not found. And PulseAudio will create it if it doesn't exist. refer: https://wiki.archlinux.org/index.php/PulseAudio/Configuration https://lists.freedesktop.org/archives/pulseaudio-discuss/2014-December/022719.html Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-07parselogs.py: update network interface related messagesChangqing Li
along with systemd upgrade, error message related change network interface have changed, update it. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-28oeqa: default runtime json results for testexportStefan Kral
Set the json result output dir in the oeqe runtime context to create testresults.json file by default for exported runtime test runs. Use current datetime for the json result property name (not DATETIME from build) to allow multiple result entries. Signed-off-by: Stefan Kral <sk@typedivision.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-28oeqa/runtime/cases: Disable and stop systemd-timesyncdAlex Kiernan
Stopping systemd-timesyncd doesn't prevent it being restarted by a different transaction within systemd. Disable the service instead during the date test to ensure it can't be restarted. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12oeqa/qemuarm64: Ignore logind: failed to get session seatKhem Raj
When booting weston images this error is seen commonly, but Qemu boots the image fine, session seat error is thrown by libweston perhaps using --seat option or setting XDG_SEAT variable in weston.ini could fix it [YOCTO #13828] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12oeqa/runtime/context.py: fix typoStefan Kral
Signed-off-by: Stefan Kral <sk@typedivision.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-07parselogs.py: ignore rdrand initialization failureMingli Yu
On the system whose cpu doesn't support rdrand, there comes below message when start rngd service #systemctl status rngd [snip] Feb 25 05:08:14 qemux86-64 rngd[133]: [rdrand]: Initialization Failed [snip] Actually the failed message doesn't matter as it only indicates one entropy source as rdrand fails to initialize and won't affect rngd function. So add to ignore the failure message to fix below error during do_testimage: NOTE: ====================================================================== NOTE: FAIL: test_parselogs (parselogs.ParseLogsTest) NOTE: ---------------------------------------------------------------------- NOTE: Traceback (most recent call last): File "/buildarea/layers/oe-core/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f return func(*args, **kwargs) File "/buildarea/layers/oe-core/meta/lib/oeqa/runtime/cases/parselogs.py", line 370, in test_parselogs self.assertEqual(errcount, 0, msg=self.msg) AssertionError: 1 != 0 : Log: /buildarea/tmp/work/qemux86-64-wrs-linux/wrlinux-image-std/1.0-r5/target_logs/daemon.log Central error: 2020-03-06T09:45:12.774286+00:00 qemux86-64 rngd[134]: [rdrand]: Initialization Failed Reference: https://github.com/nhorman/rng-tools/pull/84 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06oeqa-runtime: add missing import os to ptest caseStefan Kral
Add missing import os statement to the oeqa runtime ptest.py Signed-off-by: Stefan Kral <sk@typedivision.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-02ltp: Update to 20200120Petr Vorel
Removed ffsb copying file and associated runtest file fs_ext4 (both removed in this release). Added LIBS=-lfts for MUSL. Removed patches (accepted upstream) * 0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch * 0001-testcases-fix-an-absent-format-string-issue.patch * 0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch Merged patches * 0006-rt_tgsigqueueinfo-disable-test-on-musl.patch (into 0001-build-Add-option-to-select-libc-implementation.patch as they touch the same files) Refreshed patches (some tests have been fixed for musl) * 0001-Add-more-musl-exclusions.patch * 0001-build-Add-option-to-select-libc-implementation.patch * 0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch IMHO this one shouldn't be needed not, but CI still fails without it Updated status * 0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch * 0001-syscalls-Check-for-time64-unsafe-syscalls-before-usi.patch Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-25ptest: add an option to enforce a failure (e.g. ptests are required to pass)Alexander Kanavin
This can be useful with a more specific, targeted and robust set of ptest packages; the benefit is that ptest regressions are caught as they happen and can be more easily traced to changes that caused them. The existing AB ptest image continues to be expected to fail, my observation of the AB runs is that the full set of ptests is not robust enough (particularly around socket/network related tests) and sporadically fails in random places. This can probably be addressed by making ptests exclusive to a worker (e.g. there is no other workload happening at the same time as ptests). Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18weston: add a basic runtime testAlexander Kanavin
The test is checking that weston is able to start. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18qemux86: drop resolution setting via uvesafbAlexander Kanavin
I am not sure if this has ever worked, but uvesafb is a really outdated (VBE from the 1990s), awkward (needs v86d) and limited (no support for high resolutions) way to do it. The specific reason 640x480-32 was introduced (ages ago) was to force 32 bit mode with vmware driver, as 16bit had rendering issues. The modern, supported option is video=... kernel parameter documented here: https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes_and_EDID https://github.com/torvalds/linux/blob/master/Documentation/fb/modedb.rst which can be passed directly to runqemu and doesn't require special kernel modules. Sato under X will continue to use 640x480 as that is hardcoded into xorg.conf under qemu. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14oeqa: Use --disable-maintainer-mode configure optionKhem Raj
since the versions of autotools might differ on target and build host, plus difference in timestamps for configure and system can result in reconfigure lets avoid that by disabling maintainer mode Avoids error: newly created file is older than distributed files! [YOCTO #13779] Suggested-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08oeqa: Use cpio 2.13 as testcaseKhem Raj
cpio 2.12 was released in 2015 and might have used older autotools which could result in errors like https://bugzilla.yoctoproject.org/show_bug.cgi?id=13779 Bumping to 2.13 will help in matching the tool versions A good change on top would be to run aclocal -I .; autoheader; autoconf; automake --add-missing -c before running configure step perhaps [YOCTO #13779] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-05logrotate.py: improve oeqa test implementationTrevor Gamblin
See bug https://bugzilla.yoctoproject.org/show_bug.cgi?id=13632 Autobuilder tests occasionally fail, reporting that a new logfile could not be created. While this failure did occur multiple times, it could not be manually reproduced. However, there are issues with the implementation of the logrotate.py script that can be fixed. These changes will help make the failures clearer, should they continue to occur. Previously, the test_2_logrotate test would, after running the logrotate tool, use "ls -al $HOME/logrotate_dir | wc -l" to count the number of files in the rotation directory and determine if the rotation was successful. The test to see if there are at least three files is problematic, because depending on the version of ls used, it may report the target value of 3 even when there are only hidden files in the directory, potentially reporting a pass for the test when it should actually fail. An example with coreutils: root@qemux86-64:~# ls -al emptydir/ total 2 drwxr-xr-x 2 root root 1024 Jan 14 19:50 . drwx------ 3 root root 1024 Jan 14 19:50 .. root@qemux86-64:~# Where "total" is the number of blocks used. Compare with busybox ls: root@qemux86-64:~# ls -al emptydir/ drwxr-xr-x 2 root root 1024 Jan 14 19:54 . drwx------ 3 root root 1024 Jan 14 19:54 .. root@qemux86-64:~# Instead of using ls to verify that a certain number of files exists in $HOME/logrotate_dir, the tests have been changed to rotate two specific logs: the log for wtmp and a new logrotate_testfile created during the second test. Both tests check that the logs are correctly rotated into $HOME/logrotate_dir by using find and grep on the expected filename (e.g. "wtmp" when rotated becomes "wtmp.1", so we check to see that wtmp.1 is present in $HOME/logrotate_dir). In addition, should the test fail, the output from logrotate -vf is included in the test log to aid debugging. It has also been seen that in some cases, the logrotate test fails because the /var/log/wtmp file is not yet present. Since the objective of the test is to check the logrotate functionality and not the presence of certain log files, test_logrotate_wtmp uses the touch command to help ensure that the file is present before the call to logrotate is issued. Finally, note that while the autobuilder failures that this patch addresses were only seen during core-image-full-cmdline tests, these changes were successfully tested on core-image-minimal and core-image-sato with the manual addition of logrotate and openssh-sshd to the images. Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-02parselogs: remove mpc8315e-rdb from errorsArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-16ltp: update to 20190930Alexander Kanavin
Drop a big pile of backports. Add a patch to address absent string formatting error. Additional fixing of builds with musl. timers group has been merged upstream into syscalls. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-10ptest: report ptests that couldn't be run at allAlexander Kanavin
Currently if a ptest does not produce PASS or FAIL, but simply errors out, this is not caught or reported; I think some ptests may have silently regressed due to this. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30oeqa/runtime/ptest: fix detection of failed testsAndré Draszik
Since commit d6065f136f6d ("oeqa/logparser: Various misc cleanups"), 7b17274c30c6 in poky, the ptest OEQA is unable to detect failures in any of the test results. The reason is that the test result string changed from 'fail' to 'FAILED', because the original mapping has been removed as part of that commit, but the code in here is still trying to match against the old string, resulting in no matches, i.e. everything is treated as successful, even if it shouldn't be. Update the OEQA ptest test to actually work again and report failure if there was a failure. Note that the ptest test is marked as @expectedfail, so even though this test now again starts to fail, the overall OEQA test result is not affected - but at least the overall OEQA test summary reflects the correct status again. In other words: RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.26s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner: PASSED (4.05s) RESULTS - ssh.SSHTest.test_ssh: PASSED (0.60s) SUMMARY: image-debug () - Ran 3 tests in 4.937s correctly changes to: AssertionError: Failed ptests: {'dummytest': ['check_True_is_True', 'test_basic']} RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.24s) RESULTS - ssh.SSHTest.test_ssh: PASSED (0.56s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner: EXPECTEDFAIL (4.13s) SUMMARY: image-debug () - Ran 3 tests in 4.937s instead and we see a summary of the ptest subtests that failed. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-18sysklogd: update to 2.0.3Alexander Kanavin
Drop all patches as they are no longer necessary with autotools, fix problems that are addressed upstream, or (in case of no-vectorization.patch) don't apply to the old version either, which means no one is using that hw target anymore. Remove custom systemd configs (provided by upstream), and custom syslog config (also provided by upstream but not installed by default). Adjust parselogs to not error out on not being able to find System.map file during boot (that is packaged into kernel-dev and is not normally installed). License-Update: various tweaks; the license terms are the same. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16oeqa/runtime/apt dnf opkg: support running from within docker containerAndré Draszik
If the user specified an http port to use for serving files, use that instead of a random one. At the same time, have the http server bind to all interfaces. Binding to the server_ip might not always be possible, e.g. in the case of running bitbake / oeqa from within a docker container. In this case, the ip address is valid outside the container, but not inside, and hence can't be bound to. So switch to simply binding to all interfaces. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16oeqa/runtime/context.py: support listening port in TEST_SERVER_IPAndré Draszik
Similar to the existing possibility to specify a port in TEST_TARGET_IP, allow TEST_SERVER_IP to also contain a port. The intention is for this port to be passed into e.g. the http server from the apt / dnf / opkg tests, or any other (custom) tests that might need the target to connect to a service spawned by bitbake / oeqa, where bitbake is actually running inside a docker container. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21oeqa/manual/compliance-test: move crashme to runtimeArmin Kuster
[v3] remove fork12 from crashme. runs forever missed in v2 resend Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21oeqa/manual/bsp-hw: move storage tests to runtimeArmin Kuster
move usb mount, r/w and umount tests to runtime move SD card mount, r/w and umount tests to runtim Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21oeqa/runtime/boot: add reboot testArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23oeqa/runtime/context.py: ignore more files when loading controllersAndré Draszik
When loading controllers as (external) modules, the code currently tries to load all files ending with .py. This is a problem when during development using an editor that creates a lock-file in the same directory as the .py file, as the lock file is typically called '.#xxxx.py'. Python will try to load the lock file and fail miserably with an exception: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_testimage(d) 0003: File: 'poky/meta/classes/testimage.bbclass', lineno: 114, function: do_testimage 0110: netstat -an 0111:} 0112: 0113:python do_testimage() { *** 0114: testimage_main(d) 0115:} 0116: 0117:addtask testimage 0118:do_testimage[nostamp] = "1" File: 'poky/meta/classes/testimage.bbclass', lineno: 294, function: testimage_main 0290: 0291: # the robot dance 0292: target = OERuntimeTestContextExecutor.getTarget( 0293: d.getVar("TEST_TARGET"), logger, d.getVar("TEST_TARGET_IP"), *** 0294: d.getVar("TEST_SERVER_IP"), **target_kwargs) 0295: 0296: # test context 0297: tc = OERuntimeTestContext(td, logger, target, host_dumper, 0298: image_packages, extract_dir) File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 116, function: getTarget 0112: # XXX: Don't base your targets on this code it will be refactored 0113: # in the near future. 0114: # Custom target module loading 0115: target_modules_path = kwargs.get('target_modules_path', '') *** 0116: controller = OERuntimeTestContextExecutor.getControllerModule(target_type, target_modules_path) 0117: target = controller(logger, target_ip, server_ip, **kwargs) 0118: 0119: return target 0120: File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 128, function: getControllerModule 0124: # ImportError raised if a provided module can not be imported. 0125: @staticmethod 0126: def getControllerModule(target, target_modules_path): 0127: controllerslist = OERuntimeTestContextExecutor._getControllerModulenames(target_modules_path) *** 0128: controller = OERuntimeTestContextExecutor._loadControllerFromName(target, controllerslist) 0129: return controller 0130: 0131: # Return a list of all python modules in lib/oeqa/controllers for each 0132: # layer in bbpath File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 163, function: _loadControllerFromName 0159: # Raise ImportError if a provided module can not be imported 0160: @staticmethod 0161: def _loadControllerFromName(target, modulenames): 0162: for name in modulenames: *** 0163: obj = OERuntimeTestContextExecutor._loadControllerFromModule(target, name) 0164: if obj: 0165: return obj 0166: raise AttributeError("Unable to load {0} from available modules: {1}".format(target, str(modulenames))) 0167: File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 173, function: _loadControllerFromModule 0169: @staticmethod 0170: def _loadControllerFromModule(target, modulename): 0171: obj = None 0172: # import module, allowing it to raise import exception *** 0173: module = __import__(modulename, globals(), locals(), [target]) 0174: # look for target class in the module, catching any exceptions as it 0175: # is valid that a module may not have the target class. 0176: try: 0177: obj = getattr(module, target) Exception: ImportError: No module named 'oeqa.controllers.' Simply ignore those when collecting the list of files to try to load. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19oeqa/runtime/systemd: skip unit enable/disable on read-only-rootfsAndré Draszik
This doesn't work on read-only-rootfs: AssertionError: 1 != 0 : SYSTEMD_BUS_TIMEOUT=240s systemctl disable avahi-daemon.service Failed to disable unit: File /etc/systemd/system/multi-user.target.wants/avahi-daemon.service: Read-only file system This patch does two things: 1) Decorate the existing test to be skipped if the rootfs is read-only 2) add a new test to be executed only if the rootfs is read-only. This new test remounts the rootfs read-write before continuing to execute the existing test, making sure to clean up correctly after itself (remount r/o again). Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19oeqa/runtime/opkg: skip install on read-only-rootfsAndré Draszik
Images can have package management enabled, but be generally running as read-only. In this case, the test fails at the moment with various errors due to that. Use the new @skipIfFeature decorator to also skip this test in that case. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19oeqa/runtime/df: don't fail on long device namesAndré Draszik
When device names are long (more than 20 characters), the df test will fail with an exception: self.assertTrue(int(output)>5120, msg=msg) ValueError: invalid literal for int() with base 10: '' at least when busybox is in use. The reason is that busybox breaks the line in that case: Filesystem 1K-blocks Used Available Use% Mounted on /dev/disk/by-partuuid/8e991e5a-cebd-4f88-9494-c9db4f30cb02 1998672 87024 1790408 5% / and the code tries to extract the fourth field from the second line, which is empty of course. df can be told not to break lines, though, using the -P flag, which turns on the POSIX output format, and is supported by busybox df and coreutils df: Filesystem 1024-blocks Used Available Capacity Mounted on /dev/disk/by-partuuid/8e991e5a-cebd-4f88-9494-c9db4f30cb02 1998672 87024 1790408 5% / Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-08dnf.py: check busybox for case test_dnf_installrootKai Kang
Check package busybox which is required by cases test_dnf_installroot and test_dnf_installroot_usrmerge. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07oeqa: Recognise svlogd as another loggerKhem Raj
This is provided by runit which another init system like systemd, sysvinit, this lets oeqa run on systems which are using runit Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07dnf.py: installroot support usrmergeChangqing Li
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30qemu: switch to '-vga std' emulated hardware from vmware/cirrus for x86/mipsAlexander Kanavin
This is the qemu default since qemu 2.2, is generally supported better, and is recommended by upstream. It also has already been in use for arm/risc and ovmf. Additional information: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13466 https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ '-vga virtio' emulated hardware remains in use when virgl is enabled via a runqemu override. Also, adjust the error whitelist, as there is a number of new messages coming from the drivers that are not actual errors. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13oeqa/parselogs: grep for exact errors list keywordsKhem Raj
Given grep expression looks for error strings regardless of the semantics and this ends up it flagging things like *********************** Log: /mnt/a/yoe/build/tmp/work/raspberrypi3_64-yoe-linux-musl/yoe-qt5-wayland-image/1.0-r0/target_logs/weston.log ----------------------- Central error: EGL_KHR_create_context_no_error EGL_KHR_fence_sync *********************** here EGL_KHR_create_context_no_error is an API, therefore the check should be tightened a bit so explicitly look for error words so such false positives don't show up This helps in fixing wrong matches e.g. on rpi3 dmesg have strings like above Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13oeqa/buildgalculator.py: Add dependency on gtk+3Khem Raj
This helps in skipping this test on images which are not using gtk and as per the gcalculator website it needs gtk+3 or gtk+2 and libglade as the build first looks for gtk+3 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15oeqa/runtime/rpm: Move test_rpm_query_nonroot test case to RpmBasicTestChen Qi
The test_rpm_query_nonroot test case was in RpmInstallRemoveTest. But it should logically belong to RpmBasicTest. So move it there. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>