Writing Device Drivers

Testing Loading and Unloading

Because a driver that will not load or unload can force unscheduled downtime, it is important that loading and unloading be thoroughly tested.

A script like the following should suffice:

#!/bin/sh
cd <location_of_driver>
while [ 1 ]
do
        modunload -i 'modinfo | grep " <driver_name> " | cut -cl-3' &
        modload <driver_name> &
done