public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [i-g-t PATCH 1/3] tests: add more checks for finding the debugfs in script based tests
Date: Fri, 14 Oct 2016 14:50:49 +0300	[thread overview]
Message-ID: <874m4fw3mu.fsf@intel.com> (raw)
In-Reply-To: <20161014105515.v5w5nv7alkzyzhjy@platvala-desk.ger.corp.intel.com>

On Fri, 14 Oct 2016, Petri Latvala <petri.latvala@intel.com> wrote:
> On Thu, Oct 13, 2016 at 03:59:55PM +0300, Jani Nikula wrote:
>> While at it, make debugfs_path point at the debugfs root, not
>> dri. This'll be handy in future work.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  tests/drm_lib.sh | 16 ++++++++++------
>>  1 file changed, 10 insertions(+), 6 deletions(-)
>> 
>> diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
>> index 113da4c7d645..87e3ad0ab547 100755
>> --- a/tests/drm_lib.sh
>> +++ b/tests/drm_lib.sh
>> @@ -41,18 +41,22 @@ do_or_die() {
>>  	$@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit $IGT_EXIT_FAILURE)
>>  }
>>  
>> -if [ -d /debug/dri ] ; then
>> -	debugfs_path=/debug/dri
>> +if [ -d /sys/kernel/debug ]; then
>> +	debugfs_path=/sys/kernel/debug
>> +elif [ -d /debug ]; then
>> +	debugfs_path=/debug
>> +else
>> +	skip "debugfs not found"
>>  fi
>
> Would parsing the output of  `mount -t debugfs`  be an option?

I contemplated that, but decided that should be a separate change later
on. I can send a patch on top if you like.

BR,
Jani.

>
>
> --
> Petri Latvala
>
>
>
>>  
>> -if [ -d /sys/kernel/debug/dri ] ; then
>> -	debugfs_path=/sys/kernel/debug/dri
>> +if [ ! -d $debugfs_path/dri ]; then
>> +	skip "dri debugfs not found"
>>  fi
>>  
>>  i915_dfs_path=x
>>  for minor in `seq 0 16`; do
>> -	if [ -f $debugfs_path/$minor/i915_error_state ] ; then
>> -		i915_dfs_path=$debugfs_path/$minor
>> +	if [ -f $debugfs_path/dri/$minor/i915_error_state ] ; then
>> +		i915_dfs_path=$debugfs_path/dri/$minor
>>  		break
>>  	fi
>>  done
>> -- 
>> 2.1.4
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-14 11:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 12:59 [i-g-t PATCH 1/3] tests: add more checks for finding the debugfs in script based tests Jani Nikula
2016-10-13 12:59 ` [i-g-t PATCH 2/3] tests: add facility to enable/disable hda dynamic debug " Jani Nikula
2016-10-13 12:59 ` [i-g-t PATCH 3/3] tests: enable hda dynamic debug for module reload test Jani Nikula
2016-10-13 13:17 ` [i-g-t PATCH 1/3] tests: add more checks for finding the debugfs in script based tests Chris Wilson
2016-10-13 13:55   ` Jani Nikula
2016-10-13 14:02     ` Chris Wilson
2016-10-13 14:05     ` Chris Wilson
2016-10-14 10:24       ` Jani Nikula
2016-10-14 10:55 ` Petri Latvala
2016-10-14 11:50   ` Jani Nikula [this message]
2016-10-14 12:01     ` Jani Nikula
2016-10-14 12:22     ` Petri Latvala
2016-10-14 13:07       ` Jani Nikula

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=874m4fw3mu.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=petri.latvala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox