A quick fix to the KVM host class.
The KVM class is times out when building the KVM software (as part of
the install step). Timeout currently defaults to 30s, which is not long
enough to build KVM.
Patch changes timeouts to large values to ensure the host machine can
complete the compile. Having a large timeout should not be an issue,
since we are not testing the host machine and do not expect it to hang
during a compile.
From: James Puderer <James.Puderer@windriver.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1182 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/kvm.py b/server/kvm.py
index 5e5a0ab..166f725 100644
--- a/server/kvm.py
+++ b/server/kvm.py
@@ -224,14 +224,15 @@
if build:
try:
self.host.run('make -C "%s" clean' % (
- utils.sh_escape(self.build_dir),))
+ utils.sh_escape(self.build_dir),),
+ timeout=600)
except AutoservRunError:
# directory was already clean and contained
# no makefile
pass
self.host.run('cd "%s" && ./configure %s' % (
utils.sh_escape(self.build_dir),
- configure_modules,))
+ configure_modules,), timeout=600)
if syncdir:
cmd = 'cd "%s/kernel" && make sync LINUX=%s' % (
utils.sh_escape(self.build_dir),
@@ -239,7 +240,7 @@
self.host.run(cmd)
self.host.run('make -j%d -C "%s"' % (
self.host.get_num_cpu() * 2,
- utils.sh_escape(self.build_dir),))
+ utils.sh_escape(self.build_dir),), timeout=3600)
# remember path to modules
self.modules['kvm'] = "%s" %(
utils.sh_escape(os.path.join(self.build_dir,