Skip to content

Commit

Permalink
integration-test: Try using ip commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinji committed Apr 12, 2024
1 parent 6270e6a commit 8ba5b71
Show file tree
Hide file tree
Showing 3 changed files with 445 additions and 6 deletions.
16 changes: 14 additions & 2 deletions test/integration-test/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

use std::{
ffi::CStr,
io,
io::{self, Write},
net::Ipv4Addr,
process,
process::{self, Command},
sync::atomic::{AtomicU64, Ordering},
};

Expand Down Expand Up @@ -67,6 +67,18 @@ impl NetNsGuard {
unsafe { netlink_set_link_up(lo_idx as i32) }
.unwrap_or_else(|e| panic!("Failed to set `lo` up in netns {}: {e}", name));

let check_config_output = Command::new("/bin/release-check-config.sh").output();
match check_config_output {
Ok(output) => {
eprintln!("check_config status: {}", output.status);
io::stdout().write_all(&output.stdout).unwrap();
io::stderr().write_all(&output.stderr).unwrap();
}
Err(e) => {
eprintln!("Failed to run check-config.sh: {e}");
}
}

setup_test_veth_pair();

let if_idx1 = unsafe { if_nametoindex(IF_NAME_1.as_ptr()) };
Expand Down

0 comments on commit 8ba5b71

Please sign in to comment.