summaryrefslogtreecommitdiff
path: root/tests/sysfs_l3_parity
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sysfs_l3_parity')
-rwxr-xr-xtests/sysfs_l3_parity27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/sysfs_l3_parity b/tests/sysfs_l3_parity
new file mode 100755
index 00000000..6f814a13
--- /dev/null
+++ b/tests/sysfs_l3_parity
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+if ! find /sys/class/drm/card*/ | grep l3_parity > /dev/null ; then
+ echo "no l3_parity interface, skipping test"
+ exit 77
+fi
+
+SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+. $SOURCE_DIR/drm_lib.sh
+
+$SOURCE_DIR/../tools/intel_l3_parity -c
+
+#Check that we can remap a row
+$SOURCE_DIR/../tools/intel_l3_parity 0,0,0
+disabled=`$SOURCE_DIR/../tools/intel_l3_parity | grep -c 'Row 0, Bank 0, Subbank 0 is disabled'`
+if [ "$disabled" != "1" ] ; then
+ echo "Fail"
+ exit 1
+fi
+
+$SOURCE_DIR/../tools/intel_l3_parity -c
+
+#Check that we can clear remaps
+if [ `$SOURCE_DIR/../tools/intel_l3_parity | wc -c` != "0" ] ; then
+ echo "Fail"
+ exit 1
+fi