From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Kuoppala Subject: [PATCH 3/3] tests/ZZ_hangman: Test both error_state interfaces Date: Thu, 27 Jun 2013 16:54:44 +0300 Message-ID: <1372341284-14132-3-git-send-email-mika.kuoppala@intel.com> References: <1372341284-14132-1-git-send-email-mika.kuoppala@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id DB173E5C56 for ; Thu, 27 Jun 2013 06:54:46 -0700 (PDT) In-Reply-To: <1372341284-14132-1-git-send-email-mika.kuoppala@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Test both debugfs and sysfs error_state interfaces. Signed-off-by: Mika Kuoppala --- 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} + + 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