agent: skip test_load_kernel_module if non-root

We need root privilege to load a real kernel module.

Fixes: #4704
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2022-07-13 17:27:49 +08:00
parent cc4b9ac7cd
commit 4f53e010b4

View File

@ -2058,6 +2058,7 @@ mod tests {
let result = load_kernel_module(&m);
assert!(result.is_err(), "load module should failed");
skip_if_not_root!();
// case 3: normal module.
// normally this module should eixsts...
m.name = "bridge".to_string();