xref: /freebsd/tools/regression/usb/usb_enum.t (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1#!/bin/sh
2
3#
4# About:
5# This script implements a simple USB enumeration test
6#
7# Usage:
8# ./usb_enum.t ugenX.Y
9#
10
11echo "1..100"
12
13if [ "$1" = "" ]; then
14# First Root HUB
15DEV="ugen0.1"
16else
17# Custom device
18DEV="$1"
19fi
20
21for N in $(jot 100 1)
22do
23if [ -c /dev/$DEV ] && [ -r /dev/$DEV ] && usbconfig -d $DEV reset ; then
24echo "ok $N"
25else
26echo "not ok $N"
27fi
28done
29
30