xref: /freebsd/tools/regression/usb/usb_enum.t (revision 1719886f6d08408b834d270c59ffcfd821c8f63a)
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