summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2014-03-24 16:54:30 +0200
committerAlon Levy <alevy@redhat.com>2014-03-24 16:54:30 +0200
commit6a91ef5c49ad8c4ff3daf49c86fd11d134285ecf (patch)
treefbfdb227bd60d6ae116d52b49142c63759f970e6
parent82a9b00d2929d17316db811dcef5a98a12a69cc8 (diff)
add helper for testing spice get_virt
-rwxr-xr-xspice24
1 files changed, 4 insertions, 0 deletions
diff --git a/spice2 b/spice2
index 256cf4b..3e2bc28 100755
--- a/spice2
+++ b/spice2
@@ -783,9 +783,12 @@ def build_qemu_cmdline_and_env(args):
print("wrapping with valgrind memcheck")
cmdline = ['valgrind', '--error-limit=no', '--leak-check=full', '--suppressions=%s/bin/kvm.supp' % HOME,
'--log-file=/tmp/kvm_%s.valgrind' % time.strftime('%Y%m%d_%H%M%S',time.gmtime())] + cmdline
+ if args.get_virt_memset:
+ environment.append(('SPICE_GET_VIRT_MEMSET', '1'))
if args.time:
print("wrapping in time")
cmdline = ['/usr/bin/time', '--verbose'] + cmdline
+ # TODO - gate this
environment.append(('SPICE_DEBUG_ALLOW_MC', '1'))
return cmdline, environment
@@ -1087,6 +1090,7 @@ def parseargs():
misc_group.add_argument('--print-commandline-only', default=False,
action='store_true')
misc_group.add_argument('--memcheck', default=False, action='store_true')
+ misc_group.add_arguments('--get-virt-memset', default=False, action='store_true')
tests_group.add_argument('--wintest', choices=win_tests.keys())
tests_group.add_argument('--record-cmd', help='record qxl command ring')
tests_group.add_argument('--xephyr', action='store_true', default=False)