diff options
author | hselasky <hselasky@FreeBSD.org> | 2012-03-01 20:45:17 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2012-03-01 20:45:17 +0000 |
commit | 24261e9a52ac1b10b4e80d6d7ce81f171e7c0a0a (patch) | |
tree | 9d320e109d6d7943fd11b142e3c6baaa06bfa1ee /tools | |
parent | 20f70f7f55cbd6a05571983524a210f9ea3b7066 (diff) | |
download | FreeBSD-src-24261e9a52ac1b10b4e80d6d7ce81f171e7c0a0a.zip FreeBSD-src-24261e9a52ac1b10b4e80d6d7ce81f171e7c0a0a.tar.gz |
Add regression test for USB enumeration.
MFC after: 1 week
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/regression/usb/usb_enum.t | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/regression/usb/usb_enum.t b/tools/regression/usb/usb_enum.t new file mode 100755 index 0000000..fe3e754 --- /dev/null +++ b/tools/regression/usb/usb_enum.t @@ -0,0 +1,30 @@ +#!/bin/sh +# $FreeBSD$ + +# +# About: +# This script implements a simple USB enumeration test +# +# Usage: +# ./usb_enum.t ugenX.Y +# + +echo "1..100" + +if [ "$1" = "" ]; then +# First Root HUB +DEV="ugen0.1" +else +# Custom device +DEV="$1" +fi + +for N in $(jot 100 1) +do +if [ -c /dev/$DEV ] && [ -r /dev/$DEV ] && usbconfig -d $DEV reset ; then +echo "ok $N" +else +echo "not ok $N" +fi +done + |