How to Test USB Gadget Drivers
When testing USB gadget, you can typically just run a couple of quick tests. I use the following two drivers to see if it is functioning properly:
- USB Gadget Ethernet
- USB Gadget File Storage
If the driver came from an outside source, we will assume that they did more rigorous testing (such as performance metrics). If the driver is developed internally, we will want to develop a more strict framework for testing our new driver.
USB Gadget Ethernet
See HOWTO Use USB Gadget Ethernet
- Bring up the interface on the board and target.
- Ping the host from the target device.
- Ping the target from the host.
- Transfer a file via scp.
USB Gadget File Storage
See HOWTO Use USB Gadget File Storage
- Create a backing file or insert a MMC/SD/CF card.
- Probe the file_storage driver, using the backing file or the ftl-enhanced flash device as the FILE parameter.
- Connect the target to the host.
- Transfer a file from the host to the target.
- Transfer a file from the target to the host.
- Compare the checksum with the original file.