Skip to content

Commit

Permalink
display error in validate_block
Browse files Browse the repository at this point in the history
  • Loading branch information
MarceloSpessoto committed Apr 6, 2024
1 parent dc4993e commit c1099af
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/contest/contest/src/tests/cgroups/relative_blkio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,13 @@ fn validate_block_io(cgroup_name: &str, spec: &Spec) -> Result<()> {
let cgroup_path = PathBuf::from(CGROUP_ROOT)
.join("blkio/runtime-test")
.join(cgroup_name);
let block_io = get_blkio_data(&cgroup_path)?;
let block_io = match get_blkio_data(&cgroup_path) {
Ok(res) => res,
Err(err) => {
format!("{}", err);
return Err(err);
}
};

let resources = spec.linux().as_ref().unwrap().resources().as_ref().unwrap();
let spec_block_io = resources.block_io().as_ref().unwrap();
Expand Down Expand Up @@ -524,8 +530,6 @@ pub fn get_test_group() -> TestGroup {
Box::new(can_run),
Box::new(|| test_relative_blkio("non_empty_100kb", 102400, false)),
);
test_group.add(vec![
Box::new(non_empty_100kb),
]);
test_group.add(vec![Box::new(non_empty_100kb)]);
test_group
}

0 comments on commit c1099af

Please sign in to comment.