tst_module: introduce a timeout to unload modules

It may happen, that the first execution of 'rmmod module_name'
may fail for some reason (like the module is in use for some short time).

Changed tst_module_unload() to execute 'rmmod module_name' multiple
times with the total number limited by a timeout.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
1 file changed