aboutsummaryrefslogtreecommitdiff
path: root/driver/test/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'driver/test/test.sh')
-rwxr-xr-xdriver/test/test.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/driver/test/test.sh b/driver/test/test.sh
new file mode 100755
index 0000000..7dba005
--- /dev/null
+++ b/driver/test/test.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if [ $(id -u) -ne 0 ] ; then
+ echo "run me as root!" >&2
+ exit 1
+fi
+
+if [ $# -eq 0 ] ; then
+ echo "usage: $0 /dev/lork" >&2
+ exit 1
+fi
+
+DEV="$1"
+INPUT="test"
+
+echo "input \"$INPUT\" to $DEV" >&2
+echo "$INPUT" > "$DEV"
+echo "(EC $?)" >&2
+
+echo "output from $DEV:" >&2
+cat "$DEV"
+echo "(EC $?)" >&2
+
+exit 0