ltp icon indicating copy to clipboard operation
ltp copied to clipboard

containers: netns: load veth module

Open fboudra opened this issue 8 years ago • 7 comments

Most of regular distributions are shipping the virtual ethernet driver as a kernel module. The test assumes it's built-in. Attempt to load the veth module in the netns_setup() function. It will allow to get the tests running on a distro kernel and avoid to build a custom kernel for LTP purpose.

Signed-off-by: Fathi Boudra [email protected]

fboudra avatar Oct 12 '17 11:10 fboudra

Also I wonder if we should attempt to remove the module at the end if it wasn't loaded when the test was started. We probably should in order to restore the environment to the same state as it was before the test.

metan-ucw avatar Oct 25 '17 09:10 metan-ucw

I don't have a strong opinion, the other tests don't seem to save/restore the state of the modules. I'm fine to update the PR if it's required. At the moment, it seems an open question.

fboudra avatar Oct 25 '17 09:10 fboudra

@fboudra Could you please add code which would remove module in cleanup function in case it wasn't loaded?

pevik avatar May 17 '18 13:05 pevik

@fboudra I pushed your original version as it's a fix. Would you do like to implement the cleanup of veth in case it's not loaded (+ use -q for modprobe). Thanks for your work.

pevik avatar May 17 '18 14:05 pevik

@pevik thanks. I'll follow up with the suggestion about -q for modprobe.

fboudra avatar May 18 '18 08:05 fboudra

@fboudra + removing module if it's not loaded, please (ip_tests.sh has quite nice example).

pevik avatar May 18 '18 08:05 pevik

@fboudra please do you plan to work on it?

pevik avatar Oct 15 '18 17:10 pevik