aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/qemutinyrunner.py
AgeCommit message (Collapse)Author
2019-01-03oeqa/utils/qemurunner: set timeout to 60s for run_serialrbt/timeRobert Yang
The 5s timeout for non-kvm is too short, especially when the load is high, which leads to unexpected errors, so set timeout to 60s by default. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-11-09oeqa: Clean up logger handlingRichard Purdie
The logger handling in oeqa was confused at best. This patch: a) Passes in a logger through various qemu runner pieces b) Uses that logger consistently in the code c) Creates a logger for QemuRunner outside the bitbake namespace meaning we don't conflict with the tinfoil logging changes The result of this is more consistency. For runtime tests in testimage, the logs always contain the debug info, nothing is shwon on the console. For the oe-selftests, logs are intercepted and only shown if the test fails. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28oeqa: allow persistent image writes in runqemu()Patrick Ohly
By default, QemuRunner avoids modifying the image files that it boots into by enabling the qemu snapshot mode. However, some tests may want to test changes that must persists across reboots, so this mode should be optional. This can be combined by copying the image file to a temporary location first and then booting with that copy. It's also useful when testing with additional drives attached to a virtual machine. QemuTinyRunner doesn't use the snapshot parameter and therefore ignores the new parameter. Long term, a better way of passing these various configuration parameters should be used, and perhaps QemuRunner and QemuTinyRunner can be merged into one again to avoid code duplication. But for now the patch follows the exiting style. Also beware that QemuTarget.start() now acts in two different modes (with or without explicit launch command), and depending on that mode parameters like discard_writes must be ignored, i.e. not get passed to launch(). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28oeqa: tolerate interrupted select() while waiting for qemuPatrick Ohly
Sometimes, the OEQA utility code aborts with: ... File ".../meta/lib/oeqa/utils/qemurunner.py", line 131, in start return self.launch(launch_cmd, qemuparams=qemuparams, get_ip=get_ip, extra_bootparams=extra_bootparams) File ".../meta/lib/oeqa/utils/qemurunner.py", line 259, in launch sread, swrite, serror = select.select(socklist, [], [], 5) InterruptedError: [Errno 4] Interrupted system call strace shows that this is because of a SIGWINCH: Connection from 127.0.0.1:52668 select(21, [20], [], [], {5, 0}) = ? ERESTARTNOHAND (To be restarted if no handler) --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- This is related to some special conditions: * whether qemu opens a graphical console window (enabled in Poky by default) * where that window gets opened * whether the window manager changes the size of the shell window (mine is a tiling window manager and reorders and resizes windows automatically) Ignoring the interrupted system calls avoids the problem. Code elsewhere (for example, run() in ssh.py) already does the same thing. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26qemurunner: configurable timeout for run_serial()Patrick Ohly
Some commands might need to run longer than the default timeout of five seconds. If that occurred, run_serial() returned with a status code of zero (sic!) and no other indication of what went wrong. Now the timeout is configurable (with five still the default) and an explicit warning ("<<< run_serial(): command timed out after 5 seconds without output >>>") gets appended at the end of the data returned to the caller. While at it, the logic for checking for the timeout was updated a bit because both implementations could overshoot the timeout when entering select() right before the final deadline. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08qemurunner: add runqemuparams argument to commands.runqemuEd Bartosh
Added possibility to pass additional runqemu parameters down the stack of APIs: commands.runqemu -> QemuTarget.start -> QemuRunner.start This will be used to pass ovmf parameter in testing of efi wic images under qemu. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-09qemurunner.py/qemutinyrunner.py: remove runqemu-internalRobert Yang
There is no runqemu-internal any more. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10oeqa: start() add remaining args SimpleRemoteTarget and QemuTinyRunnerAníbal Limón
Now Runner's support extra_bootargs for the kernel so add extra_bootparams to the start() methods to avoid exception. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to use python3 command pipeline decodingRichard Purdie
In python3, strings are unicode by default. We need to encode/decode from command pipelines and other places where we interface with the real world using the correct locales. This patch updates various call sites to use the correct encoding/decodings. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21meta: Update to modern exception syntaxRichard Purdie
Update older exception syntax to modern one required by python 3. Compatible with python 2.7. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-16classes/oeqa: Update for print statements and file() -> open() for python3Richard Purdie
Found some more syntax cleanups needed for python3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/utils: Add runner for poky-tiny qemu.Lucian Musat
The connection and commands are done via serial. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>