aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
AgeCommit message (Collapse)Author
2013-09-26lib/oeqa/runtime: ping: wait for 5 echo repliesStefan Stanacar
Instead of considering that ping test passed after 1 reply, wait for at least 5 consecutive replies in 60 seconds (which should be enough time for connman to reconfigure the interface in systemd images and help with the fake ssh/tests fails.) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-20lib/oeqa/runtime: cleanup and improve output readability for some testsStefan Stanacar
- move everything in the same test. setUp/tearDown aren't quite the right thing here, everything it's part of the same test. (and it get's confusing when ssh fails) ldd: - change test name and add output to error message vnc: - remove unnecessary check as there is no point in doing both ps and netstat. Also improve error output a bit. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-20lib/oeqa/utils: sshcontrol: log how long the last command takeStefan Stanacar
It might be useful for debugging to have in the ssh log the number of seconds a command has run. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18qemurunner: disable grabs in automated testingRoss Burton
Use the new QEMU_DONT_GRAB environment variable to disable grabs, finally/hopefully solving the random hangs that the autobuilder has been hitting for a while. [ YOCTO #5131 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17oeqa/runtime/smart: Increase timeout to 1500 testSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13lib/oeqa/runtime: timeout increasesStefan Stanacar
Increase the timeout for smart commands as under load for qemumips it's still to small. Also give ping more time fixing a potential timeout for sato systemd. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-12bitbake.conf: include machine name in DEPLOY_DIR_IMAGEPaul Eggleton
This allows a clean seperation between image outputs from different machines, and makes it possible to have convenience symlinks to make the output ready to deploy. This did require some surgery in runqemu; if explicit paths to the image and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined from bitbake or set in the environment. However the script does try to avoid requiring it unless it really is needed. Corresponding changes were made in the automated testing code as well. Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11lib/oeqa/runtime: smart: limit channel add to useful onesStefan Stanacar
Don't add inappropiate channels on the target. This happens when building two different machines in the same dir and then running the tests for each machine. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06lib/oeqa/qemurunner: Use a timeout in select() callRichard Purdie
A 0 value to select.select() immediately returns with no timeout. This was pegging the cpu at 100% for the python process which was bad and may be contributing to some of the timeout problems. Profile from -P of a core-image-minimal before: 97526792 function calls (97525652 primitive calls) in 45.189 seconds and after: 50204 function calls (49064 primitive calls) in 17.318 seconds Saving 97.5 million function calls has to be good :) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06lib/oeqa/runtime: add basic scanelf testStefan Stanacar
This uses scanelf from the pax-utils package and scans the binaries in PATH for TEXTREL and RPATH information. For a sato image with pax-utils installed it shows no output (which is good). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06oeqa/runtime/scp: replace dd callMihai Lindner
Use a file object to generate a our test file instead of calling `dd`; removes dd's output from testimage.log, keeps unittest output clean. Also remove unused imports. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06oeqa/utils/sshcontrol: tweak ssh optionsMihai Lindner
Add ssh_options to be used, the same, by ssh and scp: Decrease LogLevel to ERROR, to suppress warnings (e.g. ssh host verifications, two warnings in case of having openssh with hpn patches); We no longer presume that the first line is a warning. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06oeqa/oetest: oeRuntimeTest: enable long messagesMihai Lindner
Set longMessage to True for all tests derived from oeRuntimeTest, in order to have somewhat info on assertions with cryptic or no messages. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-03lib/oeqa/runtime: smart: serve repo on host ip only and increase timeoutStefan Stanacar
Don't start the http server on 0.0.0.0, listen on host ip (end of tap interface) only. Also use the timeout option (default is 300s for ssh commands) for all the commands run in this module (mostly because smart update timeouts on mips). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30lib/oeqa/runtime: ping: fix ping false failStefan Stanacar
We run the ping test as soon as we reach the login prompt. But sometimes (seen in sato systemd) we end up with link down/link up stuff like: qemux86-64 login: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready The logic behind ping -w 30 -c 1 was to wait at most 30 seconds for at least one reply, but there is a catch: reply doesn't seems to be echo reply but any reply (non-reply means loss not network error) ping's man page: -w deadline Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network. Just when the link up/link down happens ping returns: From 192.168.7.1 icmp_seq=1 Destination Host Unreachable --- 192.168.7.2 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms and exits sooner than the 30 seconds timeout. This patch should do what was originally intended (wait at most 30 seconds for at least one reply). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30lib/oeqa/runtime: syslog: fix test for logger in case of systemdStefan Stanacar
Recently syslog behaviour changed for systemd images (log it's in a buffer not in /var/log/messages), account for the new stuff. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30lib/oeqa/utils: qemurunner: fix when runqemu errors outStefan Stanacar
When qemu doesn't start or runqemu errors out (some wrong option passed or sudo needs a password for setting tap) we want to display the output but oe-core commit 9de7fe11967576f4a8b24e653c6b9a02e5f6d85b/ poky commit 51588936d4a8cde3c9bb05800240c0a0f5dedf8d changed the kill method and broke this code, so let's fix it. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30lib/oeqa: move skeletoninit.py where it belongsStefan Stanacar
OE-core commit fcc59cbcdb1550489d372edf9f465efa7165245f / poky commit 748ddc39e56623f4e48987f0467f4722f6e162f2 added a new test, but in the wrong location. I took the patch from Alex's branch but renamed it from meta/lib/oeqa/runtime/skeleton.py to meta/lib/oeqa/skeletoninit.py before sending. This was unintentional, it should have been under meta/lib/oeqa/runtime. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-28classes/testimage: add support for finding tests in other layersStefan Stanacar
A layer can add tests in lib/oeqa/runtime (provided it extends BBPATH as normal) and enable them with TEST_SUITES_append = " testname". Test module names shouldn't collide though. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-28lib/oeqa/runtime: remove some unnecessary checks from setUpModuleStefan Stanacar
These checks are unnecessary. setUpModule is run when a module is loaded and we shouldn't run commands on the target here, (plus if ssh doesn't work we error out in setup multiple times, instead of skipping the real test, which might depend on test_ssh). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: smart: add checks for smart outputStefan Stanacar
Sometimes smart throws: Committing transaction... Preparing... ######################################## [ 0%] 1:Removing psplash-default ######################################## [100%] error: Couldn't fork %postun: Cannot allocate memory and returns a 0 exit code (it thinks it succesfully removed the package, when in reality it didn't), so we need to catch those specifically. Also, sometimes output from download command is: Saving cache...http://192.168.7.1:49456/rpm/x86_64_x32/psplash-default-0.1+git0+afd4e228c6-r15.x86_64_x32.rpm and that tricks our smart download test, so use a regex there. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
2013-08-26lib/oeqa/runtime: multilib: fix typoStefan Stanacar
The check was obviously wrong and it surfaced with the recent change in behaviour for skipping tests. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
2013-08-26lib/oeqa: change behaviour for unskippable testsStefan Stanacar
When a test module wants to be skipped because it doesn't apply to the image but it was nevertheless a required test (one in TEST_SUITES), we issued an warning that it was a required test and went on with running the module. Usually all tests in the module failed (e.g gcc tests on a non-sdk image), but this allowed us to know that something went wrong with the image (some package/feature didn't make it). However, instead of just issuing an warning and running the tests it's better to throw an exception. The traceback will tell us what's wrong, and we don't run every single test method. Output will look like this: --snip-- | NOTE: Test modules ['oeqa.runtime.ping', 'oeqa.runtime.ssh', 'oeqa.runtime.gcc'] | NOTE: Found 5 tests | test_ping (oeqa.runtime.ping.PingTest) ... ok | test_ssh (oeqa.runtime.ssh.SshTest) ... ok | ERROR | | ====================================================================== | ERROR: setUpModule (oeqa.runtime.gcc) | ---------------------------------------------------------------------- | Traceback (most recent call last): | File "/mnt/back/yocto/poky/meta/lib/oeqa/runtime/gcc.py", line 8, in setUpModule | skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES") | File "/mnt/back/yocto/poky/meta/lib/oeqa/oetest.py", line 108, in skipModule | "\nor the image really doesn't have the requred feature/package when it should." % (modname, reason)) | Exception: | Test gcc wants to be skipped. | Reason is: Image doesn't have tools-sdk in IMAGE_FEATURES | Test was required in TEST_SUITES, so either the condition for skipping is wrong | or the image really doesn't have the requred feature/package when it should. | | ---------------------------------------------------------------------- | Ran 2 tests in 1.036s | | FAILED (errors=1) | NOTE: Sending SIGTERM to runqemu --snip-- Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add iptables, cvs and sudoku projects build tests on targetMihai Prica
Downloads iptables/cvs/sudoku-savant sources and builds them on target. Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/utils: targetbuild: Add helper class for building packages on targetMihai Prica
This class can be used for test cases that configure and build packages on target. Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa: make it possible to restart the targetStefan Stanacar
Tweak QemuRunner so we can actually restart the qemu target in a test (if we want more memory for example). Also add a restart method to the base test class so that tests can use it. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: smart: add new smart testsMihai Lindner
Add class to be inherited by smart tests, along with more basic tests and tests using a rpm repository. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/utils: decorators: return the decorated methodMihai Lindner
Decorators should return whatever the decorated methods return. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/utils: qemurunner: save host IP addressMihai Lindner
Save host IP address to host_ip. Read /proc/PID/cmdline on host to look for IPs of target and host; instead of running 'ps'. Also removed some extra empty lines from file. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/utils: new file: httpserver.py useful for serving files over HTTP ↵Mihai Lindner
to the target It can be used by smart repo/channel tests to serve deploy_dir. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: rpm: add install and erase testsStefan Stanacar
Copies to target rpm-doc file from deploy_dir and tries to install and then remove that package. rpm-doc was chosen because it's small, it only adds a few files to target, and it's almost always found in deploy_dir for images with package-management/rpm. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add vncserver for target testMihai Prica
Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add adjust date and time testMihai Prica
Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add new scp testAlexandru Palalau
Copies a 5MB to target using scp, more of an network test than a scp one. Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add new PAM support testAlexandru Palalau
New test which verifies some usual commands functionality with PAM support Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add new skeletoninit testAlexandru Palalau
New test which verifies the usage of skeleton init script available with meta-skeleton layer Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add new logrotate testAlexandru Palalau
New logrotate test which verifies the log directory change in logrotate.conf. Needs an image with logrotate installed. Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add a test for lddCornel Stoicescu
This test checks that at least one path in RTLDLIST exists. Signed-off-by: Cornel Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add test for perlCornel Stoicescu
This test runs a perl script on the target and checks the output. Signed-off-by: Cornel Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/runtime: add basic test for x32 imagesAlexandru Georgescu
Checks that an x86-64-x32 image has the right binaries. Signed-off-by: Alexandru Georgescu <alexandru.c.georgescu@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-13lib/oeqa/runtime: add new systemd testsAlexandru Palalau
New systemd runtime tests for enable/disable service, start/stop service and list services. Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-13lib/oeqa/runtime: rework syslog testStefan Stanacar
Add separate tests for restarting syslog and using logger, and skip the configuration test for systemd images which always fail because syslog's systemd service doesn't read a config by default (see YB#4860). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-13oeqa/utils/qemurunner: get ip old fashioned way and use tcp serial consoleStefan Stanacar
The way we read data from the serial console was unreliable and blocking (AutoBuilder seems to hit that often), so change the serial console type from unix socket to tcp and reverse the connection - don't let qemu act as server (wait for a connection). So now the serial console is used to save the boot log and make sure that we reached the login prompt. Until a better way is found this should solve some of the AutoBuilder failures (one being YB#4904). Also we need to use the same method as the old qemuimagetest to get the ip (from the qemu process arguments), because that it's more reliable. The first version used here was to log into the target and use the output of "ip addr show eth0" but then systemd decides that it should rename interfaces, so that was changed to get the ip of the interface that has the default gw, but if there is no default gw we'll get the loopback ip and we end up trying to ssh into the host machine (some recent AutoBuilder runs showed that). Changed in V2: - use -ww for ps, as output might get truncated Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-05oeqa/utils/qemurunner: fix wrong var in messageStefan Stanacar
If nothing matches we should print the text not the match, else we get a nice traceback. Changed in V2: - commit message Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-01oeqa/runtime/xorg: use the right ps command for xorg testStefan Stanacar
Use our determined ps command, otherwise test fails for images with procps. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-01oeqa/utils/qemurunner: tweak console bootparam and ip commandStefan Stanacar
Sync serial baud rate with default inittab which should help with apparent boot fails. Also keep a console on tty1. Also we shouldn't assume eth0 it the right interface. (systemd images can rename interfaces to something else). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-01oeqa/utils/qemurunner: add comment and headerStefan Stanacar
One of the files was missing comment/header, unlike the others. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-01oeqa/utils/sshcontrol: increase and log timeout in outputStefan Stanacar
Increase a bit the timeout for ssh commands and also write in the output that the command timed out (it's easier to see that in a test fail than checking the ssh log) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15lib/oeqa: fix dependecy checkStefan Stanacar
Adds missing skip for smart test and fix the check (which I somehow broke a while ago). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15testimage.bbclass, lib/oeqa: add headers and commentsStefan Stanacar
Adds some comments to testimage.bbclass and the files it calls, just to give an ideea of what it does. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>