summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Brown <david.brown@linaro.org>2016-01-14 12:13:55 -0700
committerDavid Brown <david.brown@linaro.org>2016-01-14 12:13:55 -0700
commit59e6046f43414b1e8b2050f6fbdc40d73a251113 (patch)
treea8c4b2342162df8f11361c33c9165961804caed1
parent246655f5a95ce98d70df2cca29d25e15c97e7ee0 (diff)
Simplify to a single script
-rwxr-xr-xcheck-uderef.sh10
-rwxr-xr-xtest-uderef.sh19
-rw-r--r--uderef.yaml1
3 files changed, 13 insertions, 17 deletions
diff --git a/check-uderef.sh b/check-uderef.sh
deleted file mode 100755
index 2cd51b7..0000000
--- a/check-uderef.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/bash
-
-# If the marker is still present, it suggests that the UDEREF check
-# killed the running shell, and we should consider this a pass.
-if [ -f /tmp/uderef-6256ff7e ]; then
- echo "UDEREF appears to have been detected"
- echo "test: uderef: pass"
-
- rm /tmp/uderef-6256ff7e
-fi
diff --git a/test-uderef.sh b/test-uderef.sh
index 30f9ea6..86ce025 100755
--- a/test-uderef.sh
+++ b/test-uderef.sh
@@ -17,11 +17,18 @@ fi
touch /tmp/uderef-6256ff7e
cat /sys/kernel/debug/provoke-crash/DIRECT
-(echo EXCEPTION > /sys/kernel/debug/provoke-crash/DIRECT) &
+(echo EXCEPTION > /sys/kernel/debug/provoke-crash/DIRECT;
+ rm /tmp/uderef-6256ff7e) &
sleep 1
-# If we got this far, we were not killed by the UDEREF blocks in the
-# kernel, which means we should go ahead and fail.
-rm /tmp/uderef-6256ff7e
-echo "Shell was not killed by uderef"
-echo "test: uderef: fail"
+# If the marker is still present, it suggests that the UDEREF check
+# killed the running shell, and we should consider this a pass.
+if [ -f /tmp/uderef-6256ff7e ]; then
+ echo "UDEREF appears to have been detected"
+ echo "test: uderef: pass"
+
+ rm /tmp/uderef-6256ff7e
+else
+ echo "UDEREF didn't appear to work"
+ echo "test: uderef: fail"
+fi
diff --git a/uderef.yaml b/uderef.yaml
index 3e800fa..13ba28c 100644
--- a/uderef.yaml
+++ b/uderef.yaml
@@ -13,7 +13,6 @@ run:
steps:
- "pwd"
- "./test-uderef.sh"
- - "./check-uderef.sh"
parse:
pattern: "^test:\\s(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)"