Skip to content

Commit dbf5331

Browse files
committed
tests: using virtio for memcached tests
Signed-off-by: Reto Achermann <[email protected]>
1 parent 9333a91 commit dbf5331

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

kernel/tests/s11_rackscale_benchmarks.rs

+18-6
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,8 @@ fn rackscale_memcached_benchmark_sharded() {
915915
if config.is_local_host {
916916
servers.push_str(format!("tcp://localhost:{}", 11211 + i).as_str());
917917
} else {
918-
let ip = 10 + i;
918+
// +1 because tap0 is reserved for the controller.
919+
let ip = 10 + i + 1;
919920
servers.push_str(format!("tcp://172.31.0.{}:{}", ip, 11211).as_str());
920921
}
921922
} else {
@@ -1039,13 +1040,14 @@ fn rackscale_memcached_benchmark_sharded() {
10391040
let built = BuildArgs::default()
10401041
.module("rkapps")
10411042
.user_feature("rkapps:memcached-bench")
1042-
// .user_feature("rkapps:virtio")
1043-
// .user_feature("libvibrio:virtio")
1043+
.user_feature("rkapps:virtio")
1044+
.user_feature("libvibrio:virtio")
10441045
.kernel_feature("pages-4k")
10451046
.release()
10461047
.set_rackscale(false)
10471048
.build();
10481049

1050+
10491051
fn controller_run_fun(
10501052
config: Option<&MemcachedShardedConfig>,
10511053
timeout_ms: u64,
@@ -1094,15 +1096,25 @@ fn rackscale_memcached_benchmark_sharded() {
10941096
_is_baseline: bool,
10951097
_arg: Option<MemcachedShardedConfig>,
10961098
) -> Result<()> {
1097-
proc.exp_regex(r#"\[ INFO\]: bootloader/src/kernel.rs"#)
1098-
.expect("bootloaader");
1099+
match proc.exp_regex(r#"\[ INFO\]: bootloader/src/kernel.rs"#) {
1100+
Ok(_) => (),
1101+
Err( rexpect::errors::Error(rexpect::errors::ErrorKind::EOF(_expected, s, _), _state)) => {
1102+
for l in s.lines() {
1103+
println!("MEMCACHED-OUTPUT: {}", l);
1104+
}
1105+
}
1106+
Err(e) => {
1107+
println!("{e:?}");
1108+
panic!("error")
1109+
}
1110+
}
10991111

11001112
while let Ok(l) = proc.read_line() {
11011113
println!("MEMCACHED-OUTPUT: {}", l);
11021114
}
11031115

11041116
match proc.exp_regex(r#"dhcp: vioif0: adding IP address (\d+).(\d+).(\d+).(\d+)/(\d+)"#) {
1105-
Ok((prev, matched)) => {
1117+
Ok((_prev, matched)) => {
11061118
println!(" > Networking setup succeeded. {matched}");
11071119
}
11081120
Err(e) => {

kernel/testutils/src/rackscale_runner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl<T: Clone + Send + 'static> RackscaleRun<T> {
472472
let mut cmdline_client =
473473
RunnerArgs::new_with_build(&client_kernel_test, &state.built)
474474
.timeout(state.client_timeout)
475-
// .use_virtio()
475+
.use_virtio()
476476
.tap(&format!("tap{}", (i + 1) * 2))
477477
.no_network_setup()
478478
.cores(state.cores_per_client)

0 commit comments

Comments
 (0)