summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-03-02 10:11:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-03-02 10:33:25 +0000
commita3de0bc9df07918d08298d954127f07085a086e5 (patch)
treea46dc7d82cff41a80a01cb39f71c2f4418dacafd
parent02befb8b03f8c052394670f9988571429d13b227 (diff)
tests/drv_missed_irq_hang: Wait harder
Improve the busy-load for triggering a wait-on-interrupt and check for extraneous missed-interrupts before and after our tests. References: https://bugs.freedesktop.org/show_bug.cgi?id=88437 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rwxr-xr-xtests/drv_missed_irq_hang29
1 files changed, 18 insertions, 11 deletions
diff --git a/tests/drv_missed_irq_hang b/tests/drv_missed_irq_hang
index 8083fe54..e76c7db6 100755
--- a/tests/drv_missed_irq_hang
+++ b/tests/drv_missed_irq_hang
@@ -11,16 +11,11 @@ oldpath=`pwd`
cd $i915_dfs_path
function blt_wait {
- (cd $oldpath; $SOURCE_DIR/gem_exec_blt 16384) > /dev/null
- (cd $oldpath; $SOURCE_DIR/gem_exec_blt 65536) > /dev/null
- (cd $oldpath; $SOURCE_DIR/gem_exec_blt 262144) > /dev/null
+ $oldpath/$SOURCE_DIR/../benchmarks/gem_blt -r 1 -b 64 -t 1 -S > /dev/null
}
function check_for_missed_irq {
- if test `cat i915_ring_missed_irq` = 0x00000000; then
- echo "missed interrupts undetected"
- exit $IGT_EXIT_FAILURE
- fi
+ test `cat i915_ring_missed_irq` != 0x00000000
}
function check_for_hang {
@@ -37,6 +32,11 @@ fi
# clear error state first
echo > i915_error_state
+blt_wait
+if check_for_missed_irq; then
+ echo "missed interrupts detected before starting test"
+ exit $IGT_EXIT_SKOP
+fi
check_for_hang
echo 0xf > i915_ring_test_irq
@@ -47,10 +47,10 @@ if test `cat i915_ring_test_irq` != 0x0000000f; then
fi
blt_wait
-check_for_missed_irq
-check_for_hang
-
-blt_wait
+if ! check_for_missed_irq; then
+ echo "missed interrupts undetected"
+ exit $IGT_EXIT_FAILURE
+fi
check_for_hang
echo 0 > i915_ring_test_irq
@@ -70,4 +70,11 @@ if test `cat i915_ring_missed_irq` != 0x00000000; then
exit $IGT_EXIT_FAILURE
fi
+blt_wait
+if check_for_missed_irq; then
+ echo "missed interrupts detected afterwards"
+ exit $IGT_EXIT_FAILURE
+fi
+check_for_hang
+
exit $IGT_EXIT_SUCCESS