summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-31 15:45:17 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-31 15:45:17 +0200
commit4cf1b02e96b276fcd707d26c9533ab4bfad54739 (patch)
treed31ce095728f2b580510063cc292eaf476fdad48
parent55fdd7f1bb4cd5044dbbb4822180a91a9a4c0dd2 (diff)
test/sysfs_l3_parity: fixup logic
It didn't fail properly.
-rwxr-xr-xtests/sysfs_l3_parity19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/sysfs_l3_parity b/tests/sysfs_l3_parity
index f62e341f..e1cd68ba 100755
--- a/tests/sysfs_l3_parity
+++ b/tests/sysfs_l3_parity
@@ -3,13 +3,22 @@
SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
. $SOURCE_DIR/drm_lib.sh
-$SOURCE_DIR/../tools/intel_l3_parity -c 2>&1
+$SOURCE_DIR/../tools/intel_l3_parity -c
#Check that we can remap a row
-$SOURCE_DIR/../tools/intel_l3_parity 0,0,0 2>&1
+$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'`
-[ "$disabled" = "1" ] || echo "Fail" && exit -1
-$SOURCE_DIR/../tools/intel_l3_parity -c 2>&1
+if [ "$disabled" != "1" ] ; then
+ echo "Fail"
+ exit 1
+fi
+
+$SOURCE_DIR/../tools/intel_l3_parity -c
#Check that we can clear remaps
-[ `$SOURCE_DIR/../tools/intel_l3_parity | wc -c` = "0" ] || echo "Fail" && exit -1
+if [ `$SOURCE_DIR/../tools/intel_l3_parity | wc -c` != "0" ] ; then
+ echo "Fail"
+ exit 1
+fi
+
+exit 0