libvirt/docs
Daniel P. Berrange 590029f672 Introduce new OOM testing support
The previous OOM testing support would re-run the entire "main"
method each iteration, failing a different malloc each time.
When a test suite has 'n' allocations, the number of repeats
requires is  (n * (n + 1) ) / 2.  This gets very large, very
quickly.

This new OOM testing support instead integrates at the
virtTestRun level, so each individual test case gets repeated,
instead of the entire test suite. This means the values of
'n' are orders of magnitude smaller.

The simple usage is

   $ VIR_TEST_OOM=1 ./qemuxml2argvtest
   ...
   29) QEMU XML-2-ARGV clock-utc                                         ... OK
       Test OOM for nalloc=36 .................................... OK
   30) QEMU XML-2-ARGV clock-localtime                                   ... OK
       Test OOM for nalloc=36 .................................... OK
   31) QEMU XML-2-ARGV clock-france                                      ... OK
       Test OOM for nalloc=38 ...................................... OK
   ...

the second lines reports how many mallocs have to be failed, and thus
how many repeats of the test will be run.

If it crashes, then running under valgrind will often show the problem

  $ VIR_TEST_OOM=1 ../run valgrind ./qemuxml2argvtest

When debugging problems it is also helpful to select an individual
test case

  $ VIR_TEST_RANGE=30 VIR_TEST_OOM=1 ../run valgrind ./qemuxml2argvtest

When things get really tricky, it is possible to request that just
specific allocs are failed. eg to fail allocs 5 -> 12, use

  $ VIR_TEST_RANGE=30 VIR_TEST_OOM=1:5-12 ../run valgrind ./qemuxml2argvtest

In the worse case, you might want to know the stack trace of the
alloc which was failed then VIR_TEST_OOM_TRACE can be set. If it
is set to 1 then it will only print if it thinks a mistake happened.
This is often not reliable, so setting it to 2 will make it print
the stack trace for every alloc that is failed.

  $ VIR_TEST_OOM_TRACE=2 VIR_TEST_RANGE=30 VIR_TEST_OOM=1:5-5 ../run valgrind ./qemuxml2argvtest
  30) QEMU XML-2-ARGV clock-localtime                                   ... OK
      Test OOM for nalloc=36 !virAllocN
  /home/berrange/src/virt/libvirt/src/util/viralloc.c:180
  virHashCreateFull
  /home/berrange/src/virt/libvirt/src/util/virhash.c:144
  virDomainDefParseXML
  /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:11745
  virDomainDefParseNode
  /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:12646
  virDomainDefParse
  /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:12590
  testCompareXMLToArgvFiles
  /home/berrange/src/virt/libvirt/tests/qemuxml2argvtest.c:106
  virtTestRun
  /home/berrange/src/virt/libvirt/tests/testutils.c:250
  mymain
  /home/berrange/src/virt/libvirt/tests/qemuxml2argvtest.c:418 (discriminator 2)
  virtTestMain
  /home/berrange/src/virt/libvirt/tests/testutils.c:750
  ??
  ??:0
  _start
  ??:?
   FAILED

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-02-20 15:36:10 +00:00
..
api_extension xen_xs: name xendConfigVersion magic numbers 2012-02-01 16:28:17 -07:00
devhelp maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
html maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
internals Introduce new OOM testing support 2014-02-20 15:36:10 +00:00
schemas conf: Add keyboard input device type 2014-02-19 09:16:31 +01:00
32favicon.png
404.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
acl.html.in Add documentation for access control system 2013-08-09 17:13:02 +01:00
aclpolkit.html.in docs: aclpolkit: Fix a heading typo 2013-10-04 13:38:57 -04:00
api_extension.html.in maint: improve VIR_ERR_INVALID_CONN usage 2014-01-06 21:41:02 -07:00
api.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
apibuild.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
apps.html.in Link libvirt-sandbox from apps page 2013-12-02 10:46:40 +08:00
archdomain.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
architecture.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
architecture.gif
architecture.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
archnetwork.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
archnode.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
archstorage.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
auditlog.html.in docs: fix some typos 2013-12-02 11:59:18 -07:00
auth.html.in Add documentation for access control system 2013-08-09 17:13:02 +01:00
bindings.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
bugs.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
cgroups.html.in Improve cgroups docs to cover systemd integration 2013-11-12 11:23:00 +00:00
compiling.html.in build: honor autogen.sh --no-git 2013-07-09 16:15:29 -06:00
contact.html.in Document security reporting & handling process 2013-07-01 11:08:58 +08:00
csharp.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
deployment.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
devguide.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
docs.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
downloads.html.in docs: mention maintenance branches 2014-01-15 09:12:25 -07:00
drivers.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvesx.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvhyperv.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvlxc.html.in LXC: added some doc on domxml-from-native with mention of limitations 2014-02-12 17:52:47 +00:00
drvopenvz.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvparallels.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvphyp.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvqemu.html.in Fix docs generator regression in previous commit 2013-05-03 16:58:46 +01:00
drvremote.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvtest.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvuml.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvvbox.html.in Move VirtualBox driver into libvirtd 2013-05-16 16:28:53 +01:00
drvvmware.html.in VMware: Initial VMware Fusion support 2013-09-29 18:40:36 +08:00
drvxen.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
errors.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
et.png
firewall.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
footer_corner.png
footer_pattern.png
format.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
formatcaps.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
formatdomain.html.in conf: introduce spiceport chardev backend 2014-02-11 13:43:55 +01:00
formatnetwork.html.in network: disallow <bandwidth>/<mac> for bridged/macvtap/hostdev networks 2014-02-05 15:04:58 +02:00
formatnode.html.in docs: fix usb node device sub-element names 2013-08-15 11:40:50 +02:00
formatnwfilter.html.in docs: fix a typo in formatnwfilter.html.in 2013-11-15 06:00:49 -07:00
formatsecret.html.in docs: remove <auth> from secret XML format 2014-02-14 16:47:14 +01:00
formatsnapshot.html.in qemu: snapshot: Add support for external active snapshots on gluster 2014-02-14 11:07:29 +01:00
formatstorage.html.in storage: add network-dir as new storage volume type 2013-11-25 12:29:49 -07:00
formatstorageencryption.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
genaclperms.pl Add documentation for access control system 2013-08-09 17:13:02 +01:00
generic.css docs: Add some style and color to the HTML documentation 2013-01-18 15:36:38 +01:00
goals.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
governance.html.in Fix minor typo in governance doc 2014-02-04 10:43:15 -07:00
hacking1.xsl maint: tweak use of <a> in HACKING 2013-07-09 11:49:20 -06:00
hacking2.xsl maint: tweak use of <a> in HACKING 2013-07-09 11:49:20 -06:00
hacking.html.in maint: enforce comma style usage 2013-11-20 09:24:18 -07:00
hooks.html.in network: Introduce network hooks 2014-02-18 14:46:49 +01:00
hvsupport.pl New internal migration APIs with extensible parameters 2013-06-25 01:13:16 +02:00
index.html.in Write up the project governance process 2014-02-04 11:27:45 +00:00
index.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
internals.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
intro.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
java.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
library.xen remove all trailing blank lines 2009-07-16 15:06:42 +02:00
libvirt-daemon-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-daemon-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-driver-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-driver-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-header-bg.png
libvirt-header-logo.png
libvirt-net-logical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-logical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-net-physical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-physical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-object-model.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-object-model.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-virConnect-example.fig internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
libvirt-virConnect-example.png internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
libvirt.css docs: add a permalink to html headers 2014-01-27 08:42:09 +01:00
libvirtLogo404.png Add a custom 404 error page for the website 2012-06-18 20:10:29 +01:00
libvirtLogo.png
locking.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
logging.html.in docs: fix some typos about 'informations' 2013-10-22 09:47:19 +01:00
madeWith.png
main.css
Makefile.am docs: Load libvirt_access*.xml from build dir 2013-09-23 14:16:45 +02:00
migration-managed-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-managed-p2p.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-p2p.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-native.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-native.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-tunnel.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-tunnel.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-unmanaged-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-unmanaged-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration.html.in Fix minor typos in messages and docs 2013-07-30 07:07:33 -06:00
newapi.xsl docs: generate links from plain text documentation 2013-10-30 17:30:12 +01:00
news.html.in Release of libvirt-1.2.1 2014-01-16 17:25:58 +08:00
news.xsl Convert NEWS to UTF-8 2009-07-29 09:04:21 +01:00
node.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
node.gif
page.xsl docs/page.xls: remove unnecessary namespace attribute 2014-01-30 15:37:38 +01:00
pending.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
php.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
python.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
relatedlinks.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
remote.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
search.php.code.in docs: autogenerate search.php 2012-08-10 10:58:38 +02:00
search.php.in Repair the search on libvirt.org 2013-09-12 17:18:32 +08:00
secureusage.html.in Add some notes about secure usage of libvirt 2013-10-15 11:33:01 +01:00
securityprocess.html.in Fix three minor typos 2013-11-26 18:37:09 +08:00
site.xsl Fix docs generator regression in previous commit 2013-05-03 16:58:46 +01:00
sitemap.html.in Introduce new OOM testing support 2014-02-20 15:36:10 +00:00
storage.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
structures.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
subsite.xsl virCommand: docs for usage of new command APIs 2010-12-02 16:00:47 -07:00
testapi.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
testsuites.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
testtck.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
todo.cfg-example Add automatic generation of a todo item page 2010-10-12 11:26:52 +01:00
todo.pl Fix namespace bugs in API docs, todo page & hv support page 2013-05-07 11:19:04 +01:00
uri.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
virshcmdref.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
windows.html.in Point users to Virt-Viewer MSI installers for Windows builds 2013-05-07 15:29:37 +01:00
wrapstring.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00