Age | Commit message (Collapse) | Author | Files |
|
The recipe being tested (devtoo-test-patch-gz) by devtool has dependencies (at
least libxres and virtual/libx11) that cannot be built with poky-tiny distro so
skip the test for this particular policy.
[YOCTO #10891]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
fedorahosted.org was retired on March 1st, 2017. This is to
update the SRC_URI to point to github.com.
[YOCTO #11226]
Signed-off-by: Choong YinThong <yin.thong.choong@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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>
|
|
kernel providers
To generalize the unit test for other kernel providers, use virtual/kernel instead
of linux-yocto, allowing to run the selftest on non-poky distros, i.e. poky-tiny.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This change allows quering for variables with the format A_B, i.e.
PREFERRED_PROVIDER_virtual/kernel instead of just A.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
distros
Replace the glibc recipe for zlib on unit tests, otherwise tests are restricted
to glibc distros (poky).
[YOCTO #10890]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There is not much sense in creation of empty squashfs
partition. It's also not possible to create empty squashfs
partition of specified size.
Even more, prepare_empty_partition_squashfs method is
absolutely broken. It raises exception when called and
even its signature differs from the rest of of similar
methods. It means that nobody uses it and it's safe
to remove it.
Removed prepare_empty_partition_squashfs method and
testing of empty squashfs partition.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added msdos partition to the .wks file in test_fs_types
wic test case.
[YOCTO #11137]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Fixed typo in wks content: squash->squashfs
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Test image-bootpart wic plugin with globbed value of
IMAGE_BOOT_FILES variable to increase test coverage.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added test_kickstart_parser test case to test wks parser
options not yet covered by tests.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added wic test case to test all possible filesystem
types for empty and not empty partitions.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
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>
|
|
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>
|
|
runqemu() takes all parameters for the virtual machine from the
variables of the given recipe. By allowing the caller to provide a
hash with variables that get applied locally, the caller gets more
control.
Here's the intended usage:
<prepare internal-image in self.resultdir>
overrides = {
'DEPLOY_DIR_IMAGE': self.resultdir,
'IMAGE_LINK_NAME': 'internal-image-%s' % self.image_arch,
}
with runqemu('refkit-installer-image', ssh=False,
overrides=overrides) as qemu:
....
This can be used to replace the image completely with something else
or to copy it before allowing runqemu() to write into it.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Sometimes it is useful to reconfigure the qemu virtual machine
directly. runqemu has the "qemuparams" parameter for that, and the
underlying start() methods also supported modifying that via their
"params" parameter. Only the runqemu() wrapper function lacked
a way to specify additional parameters.
One potential usage is to attach additional disks.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Previously, QEMU_USE_KVM=True enabled the use of kvm only when "x86"
was in the MACHINE name. That is too limiting, because for example
intel-corei7-64 can also use kvm but it wasn't possible to enable that
without changing OE-core.
That traditional usage is still supported. In addition, QEMU_USE_KVM
can be set to a list of space-separated MACHINE names for which kvm is
to be enabled.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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>
|
|
Underscore modules are meant to be run only when manually added to the test
suite, so far another mechanisms are in place to make this happen with
runtime, sdk, and esdk (mostly in test* bbclasses).
This will add such functionality in the core framework so other specific
frameworks can take use this without adding something else.
[YOCTO #10980]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* devtool: oeqa.selftest.devtool.DevtoolTests is taking 4 or more hours on the
autobuilder because the cleanall call deletes the tarball of the kernel
source, forcing a large clone which is especially long on an NFS mount.
The cleanall invocation isn't really required here and switching to clean
instead should avoid hours of re-cloning the same repository each time we
run oe-selftest on the autobuilder.
* buildoptions: We only need to ensure the first image isn't an incremental
image, clean will suffice here.
* runtime-test: no need to clean up the artefacts generated during the test,
let's leave that to a higher level process rather than using the cleanall
hammer.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
roofs -> rootfs.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Limit the length of error logs to 40 lines. We don't need to
show/archive thousands of lines of bitbake logs if an error occurs.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Make it possible to limit the length of output lines shown in runCmd
exceptions. E.g when running bitbake we easily get thousands of lines of
log output, where only the last few (tens) are interesting or relevant
when an error occurs.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of separate rusage and child rusage values, only store their sum
value in buildstats. This is a big reduction in data footprint without
really losing any interesting data.
Also, utilize OrderedDict to order data more logically.
[YOCTO #10582]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Write out all buildstats into one big json file, instead of using
multiple per-measurement files. Individual buildstats will be indexed
using "<test_name>.<measurement_name>" as the key. Also, changes the
per-testcase working directories into temporary directories that will be
removed after test execution as there are no more per-testcase data files
to store permanently.
[YOCTO #10582]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The bb.note prints multiple same lines when invoke this class again, but
if we set mainlogger.propagate = False, nothing would be printed,
according to logging's document:
https://docs.python.org/3/library/logging.html
Note
If you attach a handler to a logger and one or more of its ancestors, it
may emit the same record multiple times. In general, you should not need
to attach a handler to more than one logger - if you just attach it to
the appropriate logger which is highest in the logger hierarchy, then it
will see all events logged by all descendant loggers, provided that
their propagate setting is left set to True. A common scenario is to
attach handlers only to the root logger, and to let propagation take
care of the rest.
We may need avoid using bb.note or bb.warn in oeqa since it attaches
multiple log handlers which may cause confusions
This patch only sets "mainlogger.propagate = False" in
selftest/runqemu.py and use logger.info to replace bb.note in
targetcontrol.py to minimize the impact.
[YOCTO #10249]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Usage:
$ oe-selftest -r runqemu
Current test cases:
$ runqemu nographic qemux86-64
$ runqemu nographic qemux86-64 ext4
$ runqemu nographic qemux86-64 iso
$ runqemu nographic core-image-minimal
$ runqemu nographic core-image-minimal vmdk
$ runqemu nographic core-image-minimal vdi
$ runqemu nographic tmp/deploy/images/qemux86-64
$ runqemu nographic tmp/deploy/images/qemux86-64 hddimg
$ runqemu nographic qemux86-64 slirp
$ runqemu nographic qemux86-64 slirp qcow2
$ runqemu nographic tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf
$ runqemu nographic tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4
Need more later:
- Test initramfs
- Test nfs
- Test when set DEPLOY_DIR_IMAGE and OECORE_NATIVE_SYSROOT
- And others which similate runqemu runs on SDK and eSDK.
[YOCTO #10249]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The launch() doesn't need runqemuparams, we need handle it in start().
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Modify the following files to test runqemu:
targetcontrol.py
utils/commands.py
utils/qemurunner.py
We need simulate how "runqemu" works in command line, so when test
"runqemu", the targetcontrol.py, utils/commands.py and
utils/qemurunner.py don't have to find the rootfs or set env vars.
[YOCTO #10249]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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>
|
|
* respect it for incremental rootfs generation
* add lists_dir option to opkg.conf
* also fix setting info_dir and status_file when they use default value, the
problem is that self.opkg_dir is already prefixed with rootfs directory,
comparing it with /var/lib/opkg always returned false and the options were
appended to config file unnecessary
* with opkg 0.3.4 we can use VARDIR prefix added in:
commit d2a8e23dc669adc398f4bb8bcfcabfcf925708f7
Author: Florin Gherendi <floring2502@gmail.com>
Date: Mon Dec 19 12:25:38 2016 +0200
libopkg: make the /var and /etc directories configurable at compile time.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* when OPKGLIBDIR doesn't have the default /var/lib value it will
silently fail to copy package database from normal rootfs to debugfs
rootfs and then when trying to install *-dbg complimentary packages
it won't install anything, because installed_pkgs.txt file generated
from debugfs is empty
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is entirely unnecessary (we can ask the signer backend to export the
key to a file when needed), and was causing confusing selftest failures
due to the variable being set from two different places.
[YOCTO #11191]
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Using RPM deploy dir was causing errors when pre-built images were
used with these steps:
https://wiki.yoctoproject.org/wiki/Quality_Assurance_yocto_project
[YOCTO #11173]
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This test case builds wic image using rawcopy plugin
running wic directly.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixed long lines, indentation and one unused variable.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Added test_rawcopy_plugin_qemu test case and wks template.
This test builds ext4 rootfs image, copies it to the root
partition of the wic image using rawcopy plugin and
boots wic image in qemu.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Not sure why this cleanup is disabled but it clearly should be running
so enable it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
wic has a new flag for setting a fixed parition size --fixed-size. Add
tests that verify if partition is indeed sized properly and that errors
are signaled when there is not enough space to fit partition data.
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Instead of assuming that bzImage is available, query bitbake enviroment
for KERNEL_IMAGETYPE.
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Wic tests will unconditionally attempt to build images that may require
dependencies that are incompatible with current target.
Resolve this by consulting HOST_ARCH first (which defaults to TARGET_ARCH)
before proceeding to build images that may be incompatible.
A convenience decorator only_for_arch() can be used to skip test cases for
specific architectures.
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Use wictestdisk instead of directdisk thus allowing more tests to be run on
non-x86 compatible machines.
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This test was attempting to exercise a broken test, for some reason this broke
with patches under review but investigation revealed that the test itself is
broken. The test has been removed, so there's no need to test it.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
A recent patch to bitbake fixes these datastore operations so that they
actually affect the server end, so we should test that they work.
(For full disclosure, some of these tests would probably pass without
those fixes, since the operation would be done on the client side
instead - but we are at least exercising the code paths.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
We currently fetch,configure,build, and install cvs as our test for the
sdk. cvs unfortunately, requires a default editor in order to run. The
change in 94790a8254d6 that checks to see if you have something like vi
installed is fragile since you may have a different default editor. This
patch switches from using cvs as a test to using cpio. cpio also uses
autotools so the functionality tested is equivalent.
Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The purpose of this test case is to verify that
devtool modify works correctly when building
the kernel.
[YOCTO #10817]
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
bb.data.expand(x, d) is deprecated API.
[YOCTO #10678]
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Configured guest network interface through serial connection
when kernel is not run by qemu.
This should make it possible to test wic images with testimage.
[YOCTO #10833]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Parsed runqemu output to get guest network configuration
if it's not present in runqemu command line.
[YOCTO #10833]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Issue: LIN9-1648
Fixed when len(TMPDIR) = 410:
$ bitbake core-image-sato-sdk
[snip]
Subprocess output:
/bin/sh: /bin/cp: Argument list too long
ERROR: core-image-sato-sdk-1.0-r0 do_rootfs: Function failed: do_rootfs
[snip]
This is because "copyhardlinktree(src, dst)" does "cp -afl src/* dst",
while src/* is expanded to "src/file1 src/file2, src/file3..." which
causes the "Argument list too long", use ./* as src and change cwd in
subprocess.check_output() to fix the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|