Re: [PATCH i-g-t 2/3] tests/drm_lib.sh: Skip when i915 debugfs wasn't found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
>
>-----Original Message-----
>From: Intel-gfx [mailto:intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Wood
>Sent: Thursday, December 3, 2015 10:08 AM
>To: Daniel Vetter
>Cc: Intel Graphics Development
>Subject: Re:  [PATCH i-g-t 2/3] tests/drm_lib.sh: Skip when i915 debugfs wasn't found
>
>On 3 December 2015 at 06:45, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote:
>> Instead of failing. We might want to move this into i915 tests 
>> eventually, but this is good for now.
>>
>> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
>> ---
>>  tests/drm_lib.sh | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh index 
>> c50664c7730d..e7ec4a1cfcb5 100755
>> --- a/tests/drm_lib.sh
>> +++ b/tests/drm_lib.sh
>> @@ -28,6 +28,11 @@ for arg in $@ ; do
>>         esac
>>  done
>>
>> +skip() {
>> +       echo "$@"
>> +       exit 1
>
>Shouldn't this be 77 to indicate skip?

Why have hard coded values at all? IGT_EXIT_SKIP is already defined as the value returned when a test skips. The code is more maintainable if fixed values are only defined in 1 place.

//Derek

>
>
>> +}
>> +
>>  die() {
>>         echo "$@"
>>         exit 1
>> @@ -54,7 +59,7 @@ for minor in `seq 0 16`; do  done
>>
>>  if [ $i915_dfs_path = "x" ] ; then
>> -       die " i915 debugfs path not found."
>> +       skip " i915 debugfs path not found."
>>  fi
>>
>>  # read everything we can
>> --
>> 2.5.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
>http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux