Add regression test for USB enumeration.
MFC after: 1 week
This commit is contained in:
parent
20f70f7f55
commit
24261e9a52
30
tools/regression/usb/usb_enum.t
Executable file
30
tools/regression/usb/usb_enum.t
Executable file
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user