From patchwork Thu Jun 27 13:54:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 2793781 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36A48BF4A1 for ; Thu, 27 Jun 2013 13:57:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 166D620370 for ; Thu, 27 Jun 2013 13:57:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D1DE0201DB for ; Thu, 27 Jun 2013 13:57:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6B16E5EA8 for ; Thu, 27 Jun 2013 06:57:13 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org 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) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 27 Jun 2013 06:54:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,952,1363158000"; d="scan'208";a="260917291" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.67]) by AZSMGA002.ch.intel.com with ESMTP; 27 Jun 2013 06:54:45 -0700 Received: by rosetta (Postfix, from userid 1000) id ADC1F8007C; Thu, 27 Jun 2013 16:54:44 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Thu, 27 Jun 2013 16:54:44 +0300 Message-Id: <1372341284-14132-3-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1372341284-14132-1-git-send-email-mika.kuoppala@intel.com> References: <1372341284-14132-1-git-send-email-mika.kuoppala@intel.com> Subject: [Intel-gfx] [PATCH 3/3] tests/ZZ_hangman: Test both error_state interfaces X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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