mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 01:16:18 +00:00
tests/ZZ_hangman: Test both error_state interfaces
Test both debugfs and sysfs error_state interfaces. v2: sysfs error_state not mandatory Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> [danvet: Update sysfs file name.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
6fd652ac1d
commit
857b464b34
@ -18,25 +18,49 @@ if [ ! -f i915_ring_stop ] ; then
|
|||||||
exit 77
|
exit 77
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if cat i915_error_state | grep -v "no error state collected" > /dev/null ; then
|
function check_iface {
|
||||||
echo "gpu hang dectected"
|
estate_fname=$1
|
||||||
exit 1
|
mandatory=$2
|
||||||
|
|
||||||
|
echo checking ${estate_fname}
|
||||||
|
|
||||||
|
if [ ! -f $estate_fname ] ; then
|
||||||
|
if [ $mandatory != 0 ] ; then
|
||||||
|
echo "'${estate_fname}' not found";
|
||||||
|
exit 1;
|
||||||
|
else
|
||||||
|
echo "${estate_fname} not mandatory";
|
||||||
|
return;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if cat $estate_fname | grep -v "no error state collected" > /dev/null ; then
|
||||||
|
echo "gpu hang detected"
|
||||||
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# stop rings
|
|
||||||
echo 0xf > i915_ring_stop
|
echo 0xf > i915_ring_stop
|
||||||
echo "rings stopped"
|
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
|
if cat $estate_fname | grep -v "no error state collected" > /dev/null ; then
|
||||||
echo "gpu hang correctly dectected"
|
echo "gpu hang correctly detected"
|
||||||
else
|
else
|
||||||
echo "gpu hang not dectected"
|
echo "gpu hang not detected"
|
||||||
exit 2
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# clear error state
|
# 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 4
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_iface $i915_dfs_path/i915_error_state 1
|
||||||
|
check_iface $i915_sfs_path/error 0
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user