All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] tests/ZZ_hangman: Test both error_state interfaces
Date: Thu, 27 Jun 2013 19:23:30 +0200	[thread overview]
Message-ID: <20130627172330.GR18285@phenom.ffwll.local> (raw)
In-Reply-To: <1372341284-14132-3-git-send-email-mika.kuoppala@intel.com>

On Thu, Jun 27, 2013 at 04:54:44PM +0300, Mika Kuoppala wrote:
> Test both debugfs and sysfs error_state interfaces.
> 
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
>  tests/ZZ_hangman |   34 +++++++++++++++++++++-------------
>  1 file changed, 21 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/ZZ_hangman b/tests/ZZ_hangman
> index 08c5514..303dbc7 100755
> --- a/tests/ZZ_hangman
> +++ b/tests/ZZ_hangman
> @@ -18,25 +18,33 @@ if [ ! -f i915_ring_stop ] ; then
>  	exit 77
>  fi
>  
> -if cat i915_error_state | grep -v "no error state collected" > /dev/null ; then
> -	echo "gpu hang dectected"
> +for estate_fname in $i915_dfs_path/i915_error_state $i915_sfs_path/error_state ; do
> +    echo checking ${estate_fname}

On second thought I think we need to auto-skip the sysfs error_state here
if it's not there. Can you please patch this up?

Thanks, Daniel

> +
> +    if cat $estate_fname | grep -v "no error state collected" > /dev/null ; then
> +	echo "gpu hang detected"
>  	exit 1
> -fi
> +    fi
>  
> -# stop rings
> -echo 0xf > i915_ring_stop
> -echo "rings stopped"
> +    echo 0xf > i915_ring_stop
> +    echo "rings stopped"
>  
> -(cd $oldpath; $SOURCE_DIR/gem_exec_big) > /dev/null
> +    (cd $oldpath; $SOURCE_DIR/gem_exec_big) > /dev/null
>  
> -if cat i915_error_state | grep -v "no error state collected" > /dev/null ; then
> -	echo "gpu hang correctly dectected"
> -else
> -	echo "gpu hang not dectected"
> +    if cat $estate_fname | grep -v "no error state collected" > /dev/null ; then
> +	echo "gpu hang correctly detected"
> +    else
> +	echo "gpu hang not detected"
>  	exit 2
> -fi
> +    fi
>  
>  # clear error state
> -echo > i915_error_state
> +    echo > $estate_fname
> +
> +    if cat $estate_fname | grep -v "no error state collected" > /dev/null ; then
> +	echo "gpu hang still present"
> +	exit 3
> +    fi
> +done
>  
>  exit 0
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-06-27 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 13:54 [PATCH 1/3] tests: rename debugfs base path to be more specific Mika Kuoppala
2013-06-27 13:54 ` [PATCH 2/3] tests: add i915_sfs_path Mika Kuoppala
2013-06-27 13:54 ` [PATCH 3/3] tests/ZZ_hangman: Test both error_state interfaces Mika Kuoppala
2013-06-27 17:23   ` Daniel Vetter [this message]
2013-06-28 11:35     ` Mika Kuoppala
2013-07-01 16:56       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130627172330.GR18285@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.