summaryrefslogtreecommitdiffstats
path: root/tools/regression/usb/usb_enum.t
blob: fe3e754c03514731c297961421b88c0d0dcc9300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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

OpenPOWER on IntegriCloud