Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2014 00:22:07 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r263213 - in user/jmmv/autotest/node: . configs/kyua1 configs/kyua2
Message-ID:  <201403160022.s2G0M7UE061888@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv
Date: Sun Mar 16 00:22:07 2014
New Revision: 263213
URL: http://svnweb.freebsd.org/changeset/base/263213

Log:
  Kill qemu if it overruns a prespecified amount of time.
  
  Do this because test suite runs can regularly get stuck due to bugs.
  Note that this change needs the newly-released shtk-1.5.

Modified:
  user/jmmv/autotest/node/configs/kyua1/head.conf
  user/jmmv/autotest/node/configs/kyua1/stable-10.conf
  user/jmmv/autotest/node/configs/kyua2/head.conf
  user/jmmv/autotest/node/configs/kyua2/stable-10.conf
  user/jmmv/autotest/node/iterate.sh

Modified: user/jmmv/autotest/node/configs/kyua1/head.conf
==============================================================================
--- user/jmmv/autotest/node/configs/kyua1/head.conf	Sat Mar 15 23:51:28 2014	(r263212)
+++ user/jmmv/autotest/node/configs/kyua1/head.conf	Sun Mar 16 00:22:07 2014	(r263213)
@@ -13,6 +13,7 @@ MKVARS="NO_CLEAN=yes WITH_TESTS=yes"
 
 TARGET=amd64
 TARGET_ARCH=amd64
+TESTS_TIMEOUT=3600
 
 # TODO(jmmv): Remove this.  lib32 builds are currently broken in combination
 # with the test suite, so we ought to fix that instead of disabling lib32.

Modified: user/jmmv/autotest/node/configs/kyua1/stable-10.conf
==============================================================================
--- user/jmmv/autotest/node/configs/kyua1/stable-10.conf	Sat Mar 15 23:51:28 2014	(r263212)
+++ user/jmmv/autotest/node/configs/kyua1/stable-10.conf	Sun Mar 16 00:22:07 2014	(r263213)
@@ -13,6 +13,7 @@ MKVARS="NO_CLEAN=yes WITH_TESTS=yes"
 
 TARGET=amd64
 TARGET_ARCH=amd64
+TESTS_TIMEOUT=3600
 
 # TODO(jmmv): Remove this.  lib32 builds are currently broken in combination
 # with the test suite, so we ought to fix that instead of disabling lib32.

Modified: user/jmmv/autotest/node/configs/kyua2/head.conf
==============================================================================
--- user/jmmv/autotest/node/configs/kyua2/head.conf	Sat Mar 15 23:51:28 2014	(r263212)
+++ user/jmmv/autotest/node/configs/kyua2/head.conf	Sun Mar 16 00:22:07 2014	(r263213)
@@ -13,6 +13,7 @@ MKVARS="NO_CLEAN=yes WITH_TESTS=yes"
 
 TARGET=i386
 TARGET_ARCH=i386
+TESTS_TIMEOUT=3600
 
 # TODO(jmmv): Remove this.  lib32 builds are currently broken in combination
 # with the test suite, so we ought to fix that instead of disabling lib32.

Modified: user/jmmv/autotest/node/configs/kyua2/stable-10.conf
==============================================================================
--- user/jmmv/autotest/node/configs/kyua2/stable-10.conf	Sat Mar 15 23:51:28 2014	(r263212)
+++ user/jmmv/autotest/node/configs/kyua2/stable-10.conf	Sun Mar 16 00:22:07 2014	(r263213)
@@ -13,6 +13,7 @@ MKVARS="NO_CLEAN=yes WITH_TESTS=yes"
 
 TARGET=i386
 TARGET_ARCH=i386
+TESTS_TIMEOUT=3600
 
 # TODO(jmmv): Remove this.  lib32 builds are currently broken in combination
 # with the test suite, so we ought to fix that instead of disabling lib32.

Modified: user/jmmv/autotest/node/iterate.sh
==============================================================================
--- user/jmmv/autotest/node/iterate.sh	Sat Mar 15 23:51:28 2014	(r263212)
+++ user/jmmv/autotest/node/iterate.sh	Sun Mar 16 00:22:07 2014	(r263213)
@@ -42,7 +42,7 @@ shtk_import process
 #
 # Please remember to update sysbuild.conf(5) if you change this list.
 AUTOTEST_CONFIG_VARS="CHROOTDIR DATADIR IMAGE MKVARS SRCBRANCH SVNROOT \
-                      TARGET TARGET_ARCH"
+                      TARGET TARGET_ARCH TESTS_TIMEOUT"
 
 
 # Paths to installed files.
@@ -231,6 +231,11 @@ autotest_execute() {
     local chrootdir="$(shtk_config_get CHROOTDIR)"
     local image="$(shtk_config_get IMAGE)"
 
+    local timeout_flag=
+    if shtk_config_has TESTS_TIMEOUT; then
+        timeout_flag="-t$(shtk_config_get TESTS_TIMEOUT)"
+    fi
+
     # TODO(jmmv): Add support for bhyve.  Keep in mind that we must continue to
     # support qemu so that we can test non-amd64 platforms from our test cluster
     # machines.  In other words: the selection of the VMM has to be exposed in
@@ -238,13 +243,13 @@ autotest_execute() {
     local target_arch="$(shtk_config_get TARGET_ARCH)"
     case "${target_arch}" in
         amd64)
-            shtk_process_run qemu-system-x86_64 -nographic \
-                -drive file="${image}"
+            shtk_process_run ${timeout_flag} \
+                qemu-system-x86_64 -nographic -drive file="${image}"
             ;;
 
         i386)
-            shtk_process_run qemu-system-i386 -nographic \
-                -drive file="${image}"
+            shtk_process_run ${timeout_flag} \
+                qemu-system-i386 -nographic -drive file="${image}"
             ;;
 
         *)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403160022.s2G0M7UE061888>