Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) # test types can be passed on the command line:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) # - control: any device can do this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) # - out, in:  out needs 'bulk sink' firmware, in needs 'bulk src'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) # - iso-out, iso-in:  out needs 'iso sink' firmware, in needs 'iso src'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) # - halt: needs bulk sink+src, tests halt set/clear from host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) # - unlink: needs bulk sink and/or src, test HCD unlink processing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) # - loop: needs firmware that will buffer N transfers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) # run it for hours, days, weeks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) # this default provides a steady test load for a bulk device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) TYPES='control out in'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #TYPES='control out in halt'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) # to test HCD code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #  - include unlink tests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #  - add some ${RANDOM}ness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #  - connect several devices concurrently (same HC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #  - keep HC's IRQ lines busy with unrelated traffic (IDE, net, ...)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #  - add other concurrent system loads
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) declare -i COUNT BUFLEN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) COUNT=50000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) BUFLEN=2048
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) # NOTE:  the 'in' and 'out' cases are usually bulk, but can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) # set up to use interrupt transfers by 'usbtest' module options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) if [ "$DEVICE" = "" ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	echo "testing ALL recognized usbtest devices"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	echo ""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	TEST_ARGS="-a"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	TEST_ARGS=""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) do_test ()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)     if ! ./testusb $TEST_ARGS -s $BUFLEN -c $COUNT $* 2>/dev/null
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)     then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	echo "FAIL"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	exit 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)     fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) ARGS="$*"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) if [ "$ARGS" = "" ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)     ARGS="$TYPES"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) # FIXME use /sys/bus/usb/device/$THIS/bConfigurationValue to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) # check and change configs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) CONFIG=''
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) check_config ()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)     if [ "$CONFIG" = "" ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	CONFIG=$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	echo "assuming $CONFIG configuration"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)     fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)     if [ "$CONFIG" = $1 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)     fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)     echo "** device must be in $1 config, but it's $CONFIG instead"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)     exit 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) echo "TESTING:  $ARGS"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) while : true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)     echo $(date)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)     for TYPE in $ARGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)     do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	# restore defaults
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	COUNT=5000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	BUFLEN=2048
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	# FIXME automatically multiply COUNT by 10 when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	# /sys/bus/usb/device/$THIS/speed == "480"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) #	COUNT=50000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	case $TYPE in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	control)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	    # any device, in any configuration, can use this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	    echo '** Control test cases:'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	    echo "test 9: ch9 postconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	    do_test -t 9 -c 5000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	    echo "test 10: control queueing"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	    do_test -t 10 -c 5000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	    # this relies on some vendor-specific commands
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	    echo "test 14: control writes"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	    do_test -t 14 -c 15000 -s 256 -v 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	    echo "test 21: control writes, unaligned"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	    do_test -t 21 -c 100 -s 256 -v 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	out)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	    check_config sink-src
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	    echo '** Host Write (OUT) test cases:'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	    echo "test 1: $COUNT transfers, same size"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	    do_test -t 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	    echo "test 3: $COUNT transfers, variable/short size"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	    do_test -t 3 -v 421
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	    COUNT=100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	    echo "test 17: $COUNT transfers, unaligned DMA map by core"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	    do_test -t 17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	    echo "test 19: $COUNT transfers, unaligned DMA map by usb_alloc_coherent"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	    do_test -t 19
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	    COUNT=2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	    echo "test 5: $COUNT scatterlists, same size entries"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	    do_test -t 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	    # try to trigger short OUT processing bugs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	    echo "test 7a: $COUNT scatterlists, variable size/short entries"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	    do_test -t 7 -v 579
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	    BUFLEN=4096
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	    echo "test 7b: $COUNT scatterlists, variable size/bigger entries"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	    do_test -t 7 -v 41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	    BUFLEN=64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	    echo "test 7c: $COUNT scatterlists, variable size/micro entries"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	    do_test -t 7 -v 63
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	iso-out)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	    check_config sink-src
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	    echo '** Host ISOCHRONOUS Write (OUT) test cases:'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	    # at peak iso transfer rates:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	    # - usb 2.0 high bandwidth, this is one frame.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	    # - usb 1.1, it's twenty-four frames.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	    BUFLEN=24500
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	    COUNT=1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) # COUNT=10000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	    echo "test 15: $COUNT transfers, same size"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	    # do_test -t 15 -g 3 -v 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	    BUFLEN=32768
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	    do_test -t 15 -g 8 -v 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	    # FIXME it'd make sense to have an iso OUT test issuing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	    # short writes on more packets than the last one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	    COUNT=100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	    echo "test 22: $COUNT transfers, non aligned"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	    do_test -t 22 -g 8 -v 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	in)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	    check_config sink-src
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	    echo '** Host Read (IN) test cases:'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	    # NOTE:  these "variable size" reads are just multiples
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	    # of 512 bytes, no EOVERFLOW testing is done yet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	    echo "test 2: $COUNT transfers, same size"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	    do_test -t 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	    echo "test 4: $COUNT transfers, variable size"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	    do_test -t 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	    COUNT=100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	    echo "test 18: $COUNT transfers, unaligned DMA map by core"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	    do_test -t 18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	    echo "test 20: $COUNT transfers, unaligned DMA map by usb_alloc_coherent"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	    do_test -t 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	    COUNT=2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	    echo "test 6: $COUNT scatterlists, same size entries"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	    do_test -t 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	    echo "test 8: $COUNT scatterlists, variable size entries"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	    do_test -t 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	iso-in)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	    check_config sink-src
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	    echo '** Host ISOCHRONOUS Read (IN) test cases:'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	    # at peak iso transfer rates:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	    # - usb 2.0 high bandwidth, this is one frame.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	    # - usb 1.1, it's twenty-four frames.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	    BUFLEN=24500
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	    COUNT=1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) # COUNT=10000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	    echo "test 16: $COUNT transfers, same size"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	    # do_test -t 16 -g 3 -v 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	    BUFLEN=32768
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	    do_test -t 16 -g 8 -v 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	    # FIXME since iso expects faults, it'd make sense
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	    # to have an iso IN test issuing short reads ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	    COUNT=100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	    echo "test 23: $COUNT transfers, unaligned"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	    do_test -t 23 -g 8 -v 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	halt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	    # NOTE:  sometimes hardware doesn't cooperate well with halting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	    # endpoints from the host side.  so long as mass-storage class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	    # firmware can halt them from the device, don't worry much if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	    # you can't make this test work on your device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	    COUNT=2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	    echo "test 13: $COUNT halt set/clear"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	    do_test -t 13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	unlink)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	    COUNT=2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	    echo "test 11: $COUNT read unlinks"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	    do_test -t 11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	    echo "test 12: $COUNT write unlinks"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	    do_test -t 12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	loop)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 	    # defaults need too much buffering for ez-usb devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	    BUFLEN=2048
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	    COUNT=32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	    # modprobe g_zero qlen=$COUNT buflen=$BUFLEN loopdefault
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	    check_config loopback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	    # FIXME someone needs to write and merge a version of this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	    echo "write $COUNT buffers of $BUFLEN bytes, read them back"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	    echo "write $COUNT variable size buffers, read them back"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	    ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 	    echo "Don't understand test type $TYPE"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	    exit 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	esac
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	echo ''
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)     done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) # vim: sw=4