Hi,
I was working on some tests for LNST where I needed to change kernel
settings
in /proc/sys a lot. Now this can be achieved by using the exec command, but
I thought, that it could be a good idea to integrate this natively into
LNST since
this could be frequently used in kernel networking tests.
There are two places (that I know of) where you'd want to call sysctl:
* in the recipe with effect through the end of the recipe
* inside of TestGeneric child classes with effect only inside the class
I think that writing a class with the following methods might work:
* set values with sysctl (original value of the option will be kept)
* restore original values
Each test could have an instance of this class available and the restore
method would
be called in destructor. And also NetTestController would have one that
would be passed
to the slaves in _prepare_slaves() and then restored in _cleanup_slaves().
Big plus of natively controlling sysctl calls is (in my opinion), that
we could easily save
the initial values and then restore them when test is over.
Honza Tluka told me that you've already considered such feature and
proposed,
that we could meet up sometime and discuss the idea further. What do you
think?
Thank you,
Radek Pazdera
Show replies by thread