Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exitstat vmtest #8221

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions below/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use store::CompressionMode;
use store::DataFrame;
use tempfile::TempDir;

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn record_replay_integration() {
let logger = get_logger();
let dir = TempDir::with_prefix("below_record_replay_test.").expect("tempdir failed");
Expand Down Expand Up @@ -120,7 +120,7 @@ fn record_replay_integration() {
);
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn advance_forward_and_reverse() {
let logger = get_logger();
let dir = TempDir::with_prefix("below_record_replay_test.").expect("tempdir failed");
Expand Down Expand Up @@ -183,7 +183,7 @@ fn advance_forward_and_reverse() {
);
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn disable_io_stat() {
let logger = get_logger();
let sample = Collector::new(
Expand All @@ -200,7 +200,7 @@ fn disable_io_stat() {
assert_eq!(sample.cgroup.io_stat, None);
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn disable_disk_stat() {
let logger = get_logger();
let sample = Collector::new(
Expand All @@ -216,7 +216,7 @@ fn disable_disk_stat() {
assert!(sample.system.disks.is_empty());
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
/// For cgroup io stat that's empty, make sure we report zero's instead of None
fn default_cgroup_io_model() {
let mut sample: Sample = Default::default();
Expand All @@ -238,7 +238,7 @@ fn default_cgroup_io_model() {
assert_eq!(io_total.dios_per_sec, Some(0.0));
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
/// When at least one of IO stat sample is None, the IO model should also be.
fn no_cgroup_io_model() {
let mut sample: Sample = Default::default();
Expand All @@ -257,7 +257,7 @@ fn no_cgroup_io_model() {
}
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn calculate_cpu_usage() {
let mut sample: Sample = Default::default();
let mut last_sample: Sample = Default::default();
Expand Down Expand Up @@ -298,7 +298,7 @@ fn calculate_cpu_usage() {
assert_eq!(total_cpu.system_pct, Some(30.0));
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn calculate_pressure() {
let mut sample: Sample = Default::default();
let mut last_sample: Sample = Default::default();
Expand Down Expand Up @@ -363,7 +363,7 @@ fn calculate_pressure() {
);
}

#[test]
#[cfg_attr(not(feature = "vmtest"), test)]
fn testing_fold_string() {
assert_eq!(fold_string("demacia", 0, 0, |_| true), "demacia");
assert_eq!(fold_string("demacia", 3, 0, |_| true), "demacia");
Expand Down
Loading