[Ezbench-dev] [PATCH 19/25] kernel-igt/compile.conf: Use timeout with chvt
Petri Latvala
petri.latvala at intel.com
Fri Feb 24 11:19:20 UTC 2017
Sometimes igt tests leave the kernel in a state where graphics just
don't work, but compilation can be done. In this state, chvt never
terminates. Use timeout with a hard-coded 5s on chvt and don't abort
if gui_start returns an error.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
profiles.d/kernel-igt/conf.d/compile.conf | 2 +-
profiles.d/utils/common.sh | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/profiles.d/kernel-igt/conf.d/compile.conf b/profiles.d/kernel-igt/conf.d/compile.conf
index b8df203..3fd5d1f 100644
--- a/profiles.d/kernel-igt/conf.d/compile.conf
+++ b/profiles.d/kernel-igt/conf.d/compile.conf
@@ -6,7 +6,7 @@ function compile_pre_hook() {
# $commitName [RO]: Name of the commit
cpu_reclocking_disable_stop
- gui_start || exit 60
+ gui_start || return 0
x_show_debug_info_start
}
diff --git a/profiles.d/utils/common.sh b/profiles.d/utils/common.sh
index affef8f..766c7bf 100644
--- a/profiles.d/utils/common.sh
+++ b/profiles.d/utils/common.sh
@@ -43,7 +43,7 @@ function vt_switch_start() {
export EZBENCH_VT_ORIG=$(sudo -n fgconsole)
local i=0
while true; do
- sudo -n chvt 5
+ sudo -n timeout 5s chvt 5
# Wait for the switch to have happened
poll_timeout 5000 0.01 "test $(sudo -n fgconsole) -eq 5"
@@ -52,14 +52,14 @@ function vt_switch_start() {
i=$(($i + 1))
- sudo -n chvt $EZBENCH_VT_ORIG
+ sudo -n timeout 5s chvt $EZBENCH_VT_ORIG
poll_timeout 1000 0.01 "test $(sudo -n fgconsole) -eq $EZBENCH_VT_ORIG"
done
}
function vt_switch_stop() {
[[ -z "$EZBENCH_VT_ORIG" ]] && return
- sudo -n chvt $EZBENCH_VT_ORIG
+ sudo -n timeout 5s chvt $EZBENCH_VT_ORIG
# Wait for the switch to have happened
poll_timeout 5000 0.01 "test $(sudo -n fgconsole) -eq $EZBENCH_VT_ORIG"
--
2.9.3
More information about the Ezbench-dev
mailing list