From 4b029a27f81d7d3c64299f2703d7beed544f3469 Mon Sep 17 00:00:00 2001 From: Darin Petkov Date: Thu, 4 Nov 2010 14:06:57 -0700 Subject: [PATCH] VM: Use -serial none in no-graphics kvm mode... ...so that the console doesn't get messed up due to the serial port being redirected from stdin. BUG=8729 TEST=./bin/cros_run_parallel_vm_tests suite_Smoke suite_Smoke; checked console Change-Id: I5a0cedba2b0ac7f453b4574666c645e84b30b379 Review URL: http://codereview.chromium.org/4501001 --- bin/cros_run_parallel_vm_tests.py | 7 +------ lib/cros_vm_lib.sh | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/cros_run_parallel_vm_tests.py b/bin/cros_run_parallel_vm_tests.py index b6403bfe65..0c0b08b88a 100755 --- a/bin/cros_run_parallel_vm_tests.py +++ b/bin/cros_run_parallel_vm_tests.py @@ -64,10 +64,6 @@ class ParallelTestRunner(object): """ ssh_port = self._base_ssh_port spawned_tests = [] - # Test runs shouldn't need anything from stdin. However, it seems that - # running with stdin leaves the terminal in a bad state so redirect from - # /dev/null. - dev_null = open('/dev/null') for test in self._tests: args = [ os.path.join(os.path.dirname(__file__), 'cros_run_vm_test'), '--snapshot', # The image is shared so don't modify it. @@ -84,8 +80,7 @@ class ParallelTestRunner(object): if self._order_output: output = tempfile.NamedTemporaryFile(prefix='parallel_vm_test_') Info('Piping output to %s.' % output.name) - proc = subprocess.Popen(args, stdin=dev_null, stdout=output, - stderr=output) + proc = subprocess.Popen(args, stdout=output, stderr=output) test_info = { 'test': test, 'proc': proc, 'output': output } diff --git a/lib/cros_vm_lib.sh b/lib/cros_vm_lib.sh index 1809acc9d1..afa481e8fb 100644 --- a/lib/cros_vm_lib.sh +++ b/lib/cros_vm_lib.sh @@ -40,7 +40,7 @@ function start_kvm() { local nographics="" local usesnapshot="" if [ ${FLAGS_no_graphics} -eq ${FLAGS_TRUE} ]; then - nographics="-nographic" + nographics="-nographic -serial none" fi if [ ${FLAGS_snapshot} -eq ${FLAGS_TRUE} ]; then