During testing of power management patches for usb ethernet dongles, a script was needed to stress test connecting/disconnecting/reconnecting these devices.
Luckily a script like that already exists as a part of the chromiumos project, and can be found here.
That script does however not run standalone and requires are remote device (chromebook) to execute on. So I took the liberty of changing it to support local testing. The modified version can be found here.
This might come in handy for someone, if not, the script will at least be archived on this site.
$ sudo pip2.7 install autotest $ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1 link/loopback 00:00:00 ...