[Ezbench-dev] [PATCH 19/25] kernel-igt/compile.conf: Use timeout with chvt
Martin Peres
martin.peres at free.fr
Fri Feb 24 11:55:22 UTC 2017
On 24/02/17 13:19, Petri Latvala wrote:
> 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.
The change you made is more than just kernel-igt.
Maybe you can split this patch in two?
- Timeout after 5s on chvt
<rest of the commit message here>
- kernel-igt/compile.conf: do not abort if gui_start fails
Now, that makes me want to check for exits in profiles... They should
never happen on runner.sh!
And that leads me back to ripping off core.sh ... which leads me again
to hacking on pygit2... I
may just write a workaround for now and do it!
>
> 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"
More information about the Ezbench-dev
mailing list