]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tests/sys/opencrypto/runtests: apply minor polish to test script
authorngie <ngie@FreeBSD.org>
Thu, 1 Jun 2017 19:58:40 +0000 (19:58 +0000)
committerngie <ngie@FreeBSD.org>
Thu, 1 Jun 2017 19:58:40 +0000 (19:58 +0000)
commitcdc66979dad90626c3d972b4f382e1274d85ef25
tree60f0a2e96b5da5266219daa5755e2b62fb3d2b17
parent5239532a828cd1e60019519f33723dfa243bcacb
tests/sys/opencrypto/runtests: apply minor polish to test script

- Refactor kld loading/unloading logic:
-- Use a loop instead of an unrolled one.
-- Check for the module being loaded before trying to load it, to reduce
   noise when loading modules that are already loaded.
-- Don't mute stderr from kldload -- it could be potentially useful to
   the tester.
-- In the event that the test script was terminated early, it would leave
   the modules still attached to the system (which is undesirable).
   Always unload the modules at test end with EXIT/SIGINT/SIGTERM so the
   system is returned to its former operating state as best possible.
   Unload the modules in reverse order, in part for consistency and/or
   dependency reasons.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
tests/sys/opencrypto/runtests.sh