Age | Commit message (Collapse) | Author |
|
If runqemu fails, ensure the log output is shown as its invaluable
to aid debugging. Its slightly convoluted since we need to ensure
we don't block on reading the pipe which may still be executing
hence the need for nonblocking IO.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixes OS hanging infinitely waiting for qemus process to release bitbake.lock
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This matches the value in testimage.bbclass, which makes sense
since the autobuilders are usually contended.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
We don't need to run bitbake -c cleansstate on this because it's being
cleaned out as part of "devtool reset".
Addresses [YOCTO #8031].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
os.environ is special and copy.copy() doesn't do what we'd expect,
changes in the child object change the parent. copy.deepcopy() is
also known to have issues with it.
Use the dedicated .copy() method which will not influence the
parent. This fixes selftest failures where the DISPLAY variable
disappears.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
'server_socket'
If start() returns False due to create_socker() failing, stop() may still get
called and currently this gives a track back since server_socket doesn't exist.
Avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
For debugging purposes, 5 lines often isn't useful as it doesn't even
cover a full backtrace. Show 25 instead.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We've had a few cases on the autobuilder where we've lost logs of
the boot and been unable to debug it further. Show this information
onto the console to be more useful.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Use the common code we now have to run QEMU instead of running it
ourselves, avoiding reliance on the machine showing up at 192.168.7.2.
This also makes a copy of the image rather than using -snapshot so if we
need to inspect the image after a failure, we can.
Fixes [YOCTO #7928].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
These tests were _deleting_ meta-intel if it happened to appear under
COREBASE, which could have been catastrophic if there was any work in
progress in that directory. It turns out we don't even need meta-intel,
but we do need a machine that's set up appropriately (e.g.
genericx86-64). Tests that involve layers outside of OE-Core don't
really belong in OE-Core, and genericx86-64 is in meta-yocto-bsp;
however we will soon have the capability to have selftest tests in other
layers, so remove this here so we can add a fixed version in
meta-yocto-bsp after that happens.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* Use our new runqemu function
* Don't hard-code the RPM4 version
* Double-check the native version is RPM4
* Check that an rpm 4.x package is in the image manifest (this isn't
strictly necessary, but "belt-and-braces" and it serves as an example
of how to do that)
* Check that the database is working on the target
* Ensure the image actually has openssh in it so we can connect to it
Initial runqemu adaptation by Richard Purdie <richard.purdie@linuxfoundation.org>
Part of the fix for [YOCTO #7994].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* We need to set EXTRA_IMAGE_FEATURES outright or existing values will
affect the test
* For test case 1107 we need "empty-root-password" to match the behaviour
described in the test case
* For test case 1115 we shouldn't be able to connect as root with the
features we are setting
Test cases 1107 and 1115 have been updated in Testopia to match.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Create a runqemu function which uses the QemuTarget() code from
oeqa.targetcontrol to setup the QEMU instance, with all of the added
robustness that that gives us. To do this, a datastore is needed for the
recipe in question (core-image-minimal) so we do the work needed to set
this up. We then use this runqemu function within the imagefeatures
tests instead of a hand-rolled implementation.
We can then use SSHControl to run the SSH tests rather than rolling our
own code to do that as an added bonus.
Fixed and extended by Paul Eggleton <paul.eggleton@linux.intel.com>.
Part of the fix for [YOCTO #7994].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If we use this outside of testimage we don't have a task log; so let's
just explicitly write the log output to a file all the time so it's
always there to look at (particularly useful when runqemu exits
immediately with an error.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* Don't wait for QEMU to start if it's never going to (because runqemu
exited with an error)
* Don't error out if killing the process fails with "no such process"
(we don't care if it's already dead)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
runqemu-internal runs stty to return the terminal to its previous state
in case QEMU hasn't done that properly (which it at least used to do
when it crashed). For some reason I have yet to determine, stty blocks
(on tcsetattr() according to gdb) when run within QemuRunner() under
oe-selftest, with the result that we always wait until the timeout and
then we kill the script, which adds an extra delay after QEMU is
stopped. Naturally you would assume that this is something to do with
the nature of the terminal under which it is being run; however no
amount of playing around with stdin/stdout/stderr seemed to fix the
issue, apart from passing in subprocess.PIPE as stdin which makes stty
error out with "stty: standard input: Inappropriate ioctl for device". I
was also unable to come up with a reliable test for the terminal which
we could use inside runqemu-internal to avoid calling stty. For now, go
with the stdin=subprocess.PIPE workaround to at least avoid the delay
with minimal ill effect.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
OE-Core commit 519e381278d40bdac79add340e4c0460a9f97e17 unfortunately
broke logging in two different ways:
1) it prevented logging to the task log from working within bitbake
-c testimage. This is due to the logger object being set up too early
which interferes with BitBake's own logging. If we prefix the name
with "BitBake." everything works (and we don't need to set the
logging level).
2) Additionally because it called the log functions on the logging
module and not the logger object it set up, this caused the
oe-selftest logging to start printing everything from that point
forward.
Fix these two issues and return us to the desired behaviour for
do_testimage.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The test directory might not exist at this point so just go ahead and
create it.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is provided for use by subclasses.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The qemu processes may no longer exist at the end of the test so
don't error if that is the case by ignoring any exceptions.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It's possible to customise the hostname trivially so don't assume that the
hostname hasn't been configured.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of running "uname -n" on the target (which actually returns the
hostname) to get something approximating the hostname (or not, if that has been
overriden), simply fetch MACHINE from the datastore.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If Pexpect throws an exception it may be because the child has already died, in
which case killpg will fail. Catch the latter exception silently, and output
the exception from Pexpect.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Move "fail to add MMCONFIG..." to qemux86_common as we started to also see it on
x86-64 with Linux 4.1.
Add "can't claim BAR..." to qemux86_common.
Generalise "Failed to access perfctr MSR" as the MSR number can change.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If DISPLAY is set, ssh-askpass can be triggered which is not what
we want in the middle of sanity tests. We can disable this by
unsetting DISPLAY.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of using bb.note() etc for logging use logging.Logger directly, allowing
the use of QemuRunner outside of bitbake.
Also clean up the logging/errors by moving create_socket() out of
__init__()/restart() and into start().
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The testcase syslog --help was rather useless and also causing problems
on images where syslog was non-busybox, like LSB images so I removed it.
Added a skip condition for TC 202 for the same reason. If syslog is
non-busybox then the test skips.
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This helps for the automatic completion of the results in testopia.
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
testcase 195: Check rpm install/removal log file size
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
(testcase 223) Check that only one connmand runs in background.
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
[YOCTO #8017] - selftest does not use pkill qemu
[YOCTO #7976] - tests do not touch .ssh/known_hosts
- don't hardcode qemu IP
[YOCTO #8027] - use qemu nographic
Extra: removed unnecessary assert for bitbake and runCmd status
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The sstate checksums should be independent of whichever NATIVELSBSTRING is
detected. Add an automated QA test which tests this using bitbake -S.
To make this possible, we need to be able to override the value of
NATIVELSBSTRING so make a small change to allow this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
imagefeatures.
Automated 2 oe-selftest testcases:
- 1116: Check if clutter image can be built
- 1117: Check Wayland support in image
Updated setup for test_efi_gummiboot_images_can_be_build and
test_wic_command_can_create_efi_gummiboot_installation_images
to accomodate latest wic changes.
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The sstate checksums for both native and target should not vary whether
they're built on a 32 or 64 bit system. Rather than requiring two different
build machines and running a builds, override the variables calling uname()
manually and check using bitbake -S.
[YOCTO #5970]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
write_config overwrites the config rather than appends to it, so
ensure we write both variables in one go.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Automated 5 oe-selftest testcase:
- 1107: Check if non root user can connect via ssh without password
- 1115: Check if all users can connect via ssh without password
- 1114: Check rpm version 4 support on image
- 1101: Check if efi/gummiboot images can be buit
- 1103: Check that wic command can create efi/gummiboot installation images
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Added decorator to some testcases missing this feature.
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|