Commit Graph

29 Commits

Author SHA1 Message Date
John Sheu
b7b095befd Use cirrus driver for QEMU
Moving to the cirrus driver (instead of std) so we can support
cirrus-fb, in preparation for nonroot-X support.

BUG=chromium-os:388
TEST=local build, run with x86-generic

Change-Id: Ic7d5776f673ac3c15680d62331345d55985f1d73
Reviewed-on: https://gerrit.chromium.org/gerrit/39900
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>
2012-12-20 15:06:03 -08:00
Brian Harring
fd8a8ee7f6 Look for both kvm and qemu-kvm.
BUG=None
TEST=manual, rename kvm to qemu-kvm, else run it on a gentoo host.

Change-Id: I4971336a1be4c07fe2c8799643f52cd094d5caf1
Reviewed-on: https://gerrit.chromium.org/gerrit/32093
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-09-05 00:00:43 -07:00
Denis Glotov
019be8526e Increase memory size of vm's to 2G
This is because ASAN bots autotests usually fail with out-of-memory.

More on the thread: https://groups.google.com/a/google.com/d/topic/chromeos-lab-infrastructure/Tuu4ir5Mc9c/discussion

BUG=chromium-os:24567
TEST=cbuildbot --local amd64-generic-asan -g I3b0f9156

Change-Id: I3b0f91566c45e0ef9e837995e353d7240ab9edea
Reviewed-on: https://gerrit.chromium.org/gerrit/24385
Commit-Ready: Denis Glotov <glotov@chromium.org>
Reviewed-by: Denis Glotov <glotov@chromium.org>
Tested-by: Denis Glotov <glotov@chromium.org>
2012-06-05 03:03:11 -07:00
Mike Frysinger
6b1abb2a6f fix up function style
The "function" keyword is superfluous, not in POSIX, is inconsistent
between bash files, and generally makes me angry.  So convert every
instance to the form:
	foo() {

BUG=None
TEST=`cbuildbot x86-generic-paladin` works

Change-Id: I97f5ca30a3edfef7222b1e08ac23917dc613b556
Reviewed-on: https://gerrit.chromium.org/gerrit/22467
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-05-11 14:10:38 -07:00
David James
42f4c75ad7 Update KVM to simulate up to 4 CPUs.
This allows KVM stage to run significantly faster. On
my machine, with this change I was able to run the pre-flight
queue VM update tests in ~369 seconds, compared to the normal
time of >1000 seconds.

BUG=chromium-os:23112, chromium-os:22784
TEST=Verify speed increase, trybot runs.

Change-Id: Ic27dd1719573fb50a412a0cfe39adf5408493ea8
Reviewed-on: https://gerrit.chromium.org/gerrit/11835
Commit-Ready: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-11-16 20:02:45 -08:00
Chris Sosa
9d9a1b1017 Change the pid logic to reuse a file if the pid no longer exists.
BUG=chromium-os:21610
TEST=Ran cros_start_vm/cros_stop_vm ... start_vm with same pid after manually
closing it, etc.

Change-Id: If4062c452a135d39a280374cbbebfa852e744022
Reviewed-on: http://gerrit.chromium.org/gerrit/9974
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2011-10-25 08:12:33 -07:00
Andrew de los Reyes
8e93647f05 kvm: set cache type to unsafe if possible, else writeback
We try to set the cache type to unsafe, which is a new kvm feature,
else we set the cache type to writeback. The hope is that these cache
types will perform better on the bots, especially in the case of the
guest trying to flush data to disk.

The CL includes code to determine which version of kvm is running, and
the cache type is chosen based on that.

BUG=chromium-os:20305
TEST=trybot

Change-Id: Icf7dbb8f0056a330282ebeb81d0902b3d54f34c5
Reviewed-on: http://gerrit.chromium.org/gerrit/8360
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2011-09-27 16:30:09 -07:00
Chris Sosa
e8ff2e848e Fix bug where we crash if our non -9 kill fails.
BUG=chromium-os:19154
TEST=Ran cros_stop_vm

Change-Id: I7150481649086e535469009c207c6fee7bb1990c
Reviewed-on: http://gerrit.chromium.org/gerrit/5972
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-08-14 17:47:35 -07:00
Chris Sosa
c894a0a0a0 Add combine_stdout_stderr as well as make success less verbose.
Change-Id: If46fd1558a00498ce4721dd756532e916f49bc19

BUG=chromium-os:12950
TEST=Ran with autestharness and ran unittests.

Review URL: http://codereview.chromium.org/6877015
2011-04-18 17:19:10 -07:00
Chris Sosa
37cccf3c33 Fix vm lib to work both in/out chroot.
Change-Id: I41ca87d7970ce59c7bbbc0e8cdaeaf5bedb43776

BUG=chromium-os:13498
TEST=Ran it both in/out

Review URL: http://codereview.chromium.org/6750012
2011-03-25 15:58:20 -07:00
Chris Sosa
99768e8e12 Robustify starting of ssh connection to vm updater.
Change-Id: Ia5e0042250da22cebadfd48d143f21597bcada5d

BUG=chromium-os:11716
TEST=Ran vm test and vm update scripts.

Review URL: http://codereview.chromium.org/6413019
2011-02-07 09:02:22 -08:00
Greg Spencer
798d75f3be This starts to fix the scripts so that they load from /usr/lib/crosutils
from within the chroot.

It also fixes a number of style issues.

It changes the meaning of cros_workon "list-all" to list all available
packages, and adds "list-live" to list all live packages.

It changes things that load chromeos-common.sh from the installer to
load it from /usr/lib/installer.

BUG=chromium-os:4230
TEST=synced, rebuilt chroot, made packages, made images, built chrome
from source, and wrote an image to a USB stick.

Review URL: http://codereview.chromium.org/6240018

Change-Id: I90c34420af1a64020402bafef8e9e77f56837c02
2011-02-01 22:04:49 -08:00
Chris Sosa
f2ee5f6871 Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=c418a8f

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=be787f3

Review URL: http://codereview.chromium.org/6277015
2011-01-26 11:38:14 -08:00
Chris Sosa
404bfdf073 Revert "Passes cache location to tests and runs the tests in parallel."
This reverts commit be787f3525.

Revert "Fix sudo again."

This reverts commit 0f411ec7d9.

TBR dgarrett

BUG=
TEST=

Review URL: http://codereview.chromium.org/6348022

Change-Id: I2fb9ca4967ff173c17840b96eb68b02ff2b7774a
2011-01-25 18:16:55 -08:00
Chris Sosa
be787f3525 Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=c418a8f

Review URL: http://codereview.chromium.org/6277015
2011-01-25 17:16:56 -08:00
Chris Sosa
27729c7dbf Revert "Passes cache location to tests and runs the tests in parallel."
This reverts commit c418a8fce7.

TBR=open tree

Change-Id: I471d186fca9084fd18858998b4bcf8cb1de19f14
2011-01-25 15:12:39 -08:00
Chris Sosa
c418a8fce7 Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Review URL: http://codereview.chromium.org/6277015
2011-01-25 13:49:29 -08:00
Chris Sosa
4e32890c9b Add new script to stop a kvm using vm library and use in harness.
Change-Id: Ie80843a7b81a37b41ae19fc33244b5c0b8152282

BUG=chromium-os:10434
TEST=Ran it with full au test harness (still running but already showing promise).

Review URL: http://codereview.chromium.org/5988006
2010-12-21 14:56:32 -08:00
Chris Sosa
40fa0ded27 Fixes to get ctest up and running again.
We had a major issue because the latest dev channel release pre-dates the virtio change.  Because of this, ctest was connecting to update that channel using virtio (which is unsupported for that).  This change drops a file telling the vm lib to use e1000 as before.

Also, fixed stateful change logic.

Change-Id: I394a8cece71bdd0d55efa21ba5b6d24804432c6b

BUG=chromium-os:10434
TEST=Ran it with ctest and cros_au_test_harness on images with/without the file.

Review URL: http://codereview.chromium.org/5928005
2010-12-17 13:15:05 -08:00
Chris Sosa
4a5d7d9858 Wait for child to exit after killing it.
Use general purpose wait in case your connecting to a vm
that you didn't start.

Change-Id: Ie67e2d3235882d372d04e4a44d0781ddfc8d4645

BUG=chromium-os:10121
TEST=Ran it, caused some crashes.  Still ran test after retries.

Review URL: http://codereview.chromium.org/5757001
2010-12-09 15:46:09 -08:00
Anush Elangovan
0de6de66db Enable virtio for tests
Change-Id: I1d0e546f6ea837928ba426e4690007ef2649f68e

BUG=10102
TEST=test KVM with -net virtio and ensure it boots and can copy files in etc

Review URL: http://codereview.chromium.org/5543006
2010-12-07 17:31:48 -08:00
Ken Mixter
08145697a5 crosutils: Add vnc view of tests running multiple tests for VM tests
Change-Id: I87c41e60797848192cee1f0c165215fcec8f5bd2

BUG=8850
TEST=Ran a few tests including suite_Smoke

Review URL: http://codereview.chromium.org/4647001
2010-11-08 18:10:08 -08:00
Darin Petkov
4b029a27f8 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
2010-11-04 14:06:57 -07:00
Olof Johansson
1688a6d416 Change KVM to use e1000
add -net nic,model=e1000 in start_kvm and in the suggested command as
output by image_to_vm.sh

Signed-off-by: Olof Johansson <olofj@chromium.org>

BUG=none
TEST=Boot an image, run lspci in a terminal, see intel nic

Review URL: http://codereview.chromium.org/3779007

Change-Id: Id7f614adec0ae69b8f4de152832538a13ea4cbad
2010-10-14 19:08:44 -05:00
Chris Sosa
d76a917edb Add a simple wrapper script around vm lib to start a vm.
Change-Id: Ic3238b3063d0e889c424ff6a9792d9c0f6bebca1

BUG=
TEST=Ran it

Review URL: http://codereview.chromium.org/3628002
2010-10-07 23:20:20 -07:00
Chris Sosa
33146728ef Add ability to vm library to retry until we can ssh into it.
Change-Id: I4de388bb1af6cd4568cdc154971927941eb73800

BUG=7503
TEST=Ran test by closing vm's as they start up to see retry work.

Review URL: http://codereview.chromium.org/3598019
2010-10-07 15:58:24 -07:00
Chris Sosa
c2db26c796 Add methods to run vm tests on x86-pre-flight-queue.
Right now we're leaving error_ok=True until the tests are shown to work on builder.

Change-Id: I6b8c690a0da30948389fd4312032c78d87115364

BUG=6906
TEST=Ran through it locally.

Review URL: http://codereview.chromium.org/3591002
2010-09-30 14:25:25 -07:00
Chris Sosa
45bec936f6 Move vm constants into their own file. This will make it easier to share these constants.
Also fixed get latest image logic in image_to_vm and allowed for using the most recent image in cros_run_vm_test to follow other shell convention of using latest.

Change-Id: I60ed4c03d609500da7f6ae34ef57ba2e32f4b0bb

BUG=
TEST=Tested by running image_to_vm with --full and cros_run_vm_test with suite_Smoke

Review URL: http://codereview.chromium.org/3597001
2010-09-29 15:38:53 -07:00
Chris Sosa
8f6ee51c21 Add persist option to vm library.
BUG=
TEST=Tested by persisting, ctrl+c, continuing and using same vm.
Also without --persist

Review URL: http://codereview.chromium.org/3419014

Change-Id: I49e26eb86101e8b8b50e58a9f277d62d5fadc664
2010-09-22 11:51:52 -07:00