On 01/30/2018 09:28 PM, Fam Zheng wrote: > To make our efforts on QEMU testing easier to consume by contributors, > let's add a document. For example, Patchew reports build errors on > patches that should be relatively easy to reproduce with a few steps, and > it is much nicer if there is such a documentation that it can refer to. > > This focuses on how to run existing tests and how to write new test > cases, without going into the frameworks themselves. > > The VM based testing section is moved from tests/vm/README which now > is a single line pointing to the new doc. > > Signed-off-by: Fam Zheng <[email protected]> >
> +Testing with "make check" > +========================= > + > +The "make check" testing family includes most of the C based tests in QEMU. > For > +a quick help, run ``make check-help`` from the source tree. > + > +The usual way to run these tests is: > + > +.. code:: > + > + make check > + > +which includes QAPI schema tests, unit tests, and QTests. Different sub-types > +of "make check" testings will be explained below. s/testings/tests/ or even s/testings// > +Since unit tests don't require environment variables, the simplest way to > debug > +a unit test failure is often directly invoking it or even running it under > +``gdb``. However there can still be differences in behavior between ``make`` > +invocations and your manual run, due to ``$MALLOC_PERTURB_`` environment > +variable (which affects memory reclaimation and catches invalid pointers s/reclaimation/reclamation/ > + $ sudo groupadd docker > + $ sudo usermod $USER -G docker > + $ sudo chown :docker /var/run/docker.sock > + > +Note that any one of above configurations makes it possible for the user to > +exploit the whole host with Docker bind mounting or other privileged > +operations. So only do it on developement machines. s/developement/development/ -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
