* [Qemu-devel] [PATCH] run: Introduce --use-malloc-perturb specific qemu flag
@ 2013-04-17 19:39 Lucas Meneghel Rodrigues
0 siblings, 0 replies; only message in thread
From: Lucas Meneghel Rodrigues @ 2013-04-17 19:39 UTC (permalink / raw)
To: virt-test-devel; +Cc: Lucas Meneghel Rodrigues, qemu-devel
Setting the environment variable MALLOC_PERTURB_ to
a non zero value [1] helps to find out some subtle
memory allocation problems, and it is being used in
our test grid. However, by default, the virt test
runner doesn't use it.
Add the new, qemu test specific --use-malloc-perturb flag
and set it to 'yes' (use the env variable) by default.
This way we're being more strict, which makes sense
in the context of a test suite. If people want to double
check the behavior of the test without the flag, just
use '--use-malloc-perturb no'.
[1] http://udrepper.livejournal.com/11429.html
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
run | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/run b/run
index 170f00a..dd203aa 100755
--- a/run
+++ b/run
@@ -238,6 +238,11 @@ class VirtTestRunParser(optparse.OptionParser):
"If -c is provided and this flag is omitted, "
"no attempt to set the qemu binaries will be made. "
"Default path: %s" % qemu_bin_path))
+ qemu.add_option("--use-malloc-perturb", action="store",
+ dest="malloc_perturb", default="yes",
+ help=("Use MALLOC_PERTURB_ env variable set to 1 "
+ "to help catch memory allocation problems on "
+ "qemu (yes or no). Default: %default"))
qemu.add_option("--accel", action="store", dest="accel", default="kvm",
help=("Accelerator used to run qemu (kvm or tcg). "
"Default: kvm"))
@@ -468,6 +473,11 @@ class VirtTestApp(object):
logging.info("Config provided, ignoring --vhost option")
+ def _process_malloc_perturb(self):
+ self.cartesian_parser.assign("malloc_perturb",
+ self.options.malloc_perturb)
+
+
def _process_qemu_specific_options(self):
"""
Calls for processing all options specific to the qemu test.
@@ -484,6 +494,7 @@ class VirtTestApp(object):
self._process_nic_model()
self._process_disk_buses()
self._process_vhost()
+ self._process_malloc_perturb()
def _process_guest_os(self):
--
1.8.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-17 19:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 19:39 [Qemu-devel] [PATCH] run: Introduce --use-malloc-perturb specific qemu flag Lucas Meneghel Rodrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).