Bind retained updater history to qualified baseline decoder contract
Rust development slice / linux (push) Failing after 7s
Rust development slice / linux (push) Failing after 7s
This commit is contained in:
@@ -520,8 +520,36 @@ mod tests {
|
||||
os::unix::fs::OpenOptionsExt,
|
||||
time::Duration,
|
||||
};
|
||||
// The production census correctly denies a changing descriptor table.
|
||||
// Other parallel unit tests open/close files in this same test process;
|
||||
// exercise each actual /proc fixture in a separate exact-test process.
|
||||
fn in_isolated_fixture(name: &str) -> bool {
|
||||
const CHILD: &str = "RMM_CENSUS_EXACT_TEST_PROCESS";
|
||||
if std::env::var_os(CHILD).as_deref() == Some(std::ffi::OsStr::new(name)) {
|
||||
return true;
|
||||
}
|
||||
let output = std::process::Command::new(std::env::current_exe().unwrap())
|
||||
.args(["--exact", name, "--test-threads=1"])
|
||||
.env(CHILD, name)
|
||||
.output()
|
||||
.unwrap();
|
||||
assert!(
|
||||
output.status.success()
|
||||
&& String::from_utf8_lossy(&output.stdout).contains("1 passed; 0 failed"),
|
||||
"isolated census fixture: {:?}\n{}\n{}",
|
||||
output.status.code(),
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
false
|
||||
}
|
||||
#[test]
|
||||
fn private_thread_fd_table_cannot_hide_a_reader_from_the_group_probe() {
|
||||
if !in_isolated_fixture(
|
||||
"census_process::tests::private_thread_fd_table_cannot_hide_a_reader_from_the_group_probe",
|
||||
) {
|
||||
return;
|
||||
}
|
||||
assert_eq!(unsafe { libc::geteuid() }, 0);
|
||||
let path = std::path::Path::new("/run")
|
||||
.join(format!("rmm-census-thread-{}", uuid::Uuid::new_v4()));
|
||||
@@ -625,6 +653,11 @@ mod tests {
|
||||
}
|
||||
#[test]
|
||||
fn actual_proc_probe_detects_existing_descriptors_and_mapped_inode_without_exporting_paths() {
|
||||
if !in_isolated_fixture(
|
||||
"census_process::tests::actual_proc_probe_detects_existing_descriptors_and_mapped_inode_without_exporting_paths",
|
||||
) {
|
||||
return;
|
||||
}
|
||||
// An isolated network-none container process, not a host-wide scan,
|
||||
// service/namespace qualification or admission-positive fixture.
|
||||
assert_eq!(unsafe { libc::geteuid() }, 0);
|
||||
|
||||
Reference in New Issue
Block a user