From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: virt-test-devel@redhat.com
Cc: Lucas Meneghel Rodrigues <lmr@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] run: Introduce --use-malloc-perturb specific qemu flag
Date: Wed, 17 Apr 2013 16:39:14 -0300 [thread overview]
Message-ID: <1366227554-11336-1-git-send-email-lmr@redhat.com> (raw)
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
reply other threads:[~2013-04-17 19:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366227554-11336-1-git-send-email-lmr@redhat.com \
--to=lmr@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=virt-test-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).