
On 01/30/2014 06:58 AM, Daniel P. Berrange wrote:
On Wed, Jan 29, 2014 at 07:52:44PM -0500, John Ferlan wrote:
Adding tests for new virModprobe{Config|Load|Unload|UseBlacklist} API's. Other than the virModprobeConfig() calls, the tests require some special set up and to be run from root.
The unit tests need to be isolated from the host OS entirely. For the load/unload APIs we could use the newly introduced 'virCommandSetDryRun' API to let us test them. Basically we only want to validate that the API is invoking the right set of commands / args. We don't actually want to affect our host kernel / os.
I hadn't followed the virCommandSetDryRun() discussion. I certainly was uncomfortable with adding the load/unload tests since yes, the host would be affected, but I still wanted a way to be able to ensure that they worked in a "controlled environment". The other hurdle with using the new API is the downstream changes requiring yet another API... John