Skip to content

Commit

Permalink
Document miri skip reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed May 3, 2024
1 parent 7a7d168 commit 35962a4
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 19 deletions.
2 changes: 1 addition & 1 deletion aya-obj/src/btf/btf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ mod tests {

#[test]
#[cfg(feature = "std")]
#[cfg_attr(miri, ignore)]
#[cfg_attr(miri, ignore = "`open` not available when isolation is enabled")]
fn test_read_btf_from_sys_fs() {
let btf = Btf::parse_file("/sys/kernel/btf/vmlinux", Endianness::default()).unwrap();
let task_struct_id = btf
Expand Down
16 changes: 8 additions & 8 deletions aya/src/maps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,10 +1147,10 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`let map_info = unsafe { &mut *(attr.info.info as *mut bpf_map_info) }` is trying to retag from <wildcard> for Unique permission, but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_name() {
use crate::generated::bpf_map_info;

Expand Down Expand Up @@ -1183,10 +1183,10 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`let map_info = unsafe { &mut *(attr.info.info as *mut bpf_map_info) }` is trying to retag from <wildcard> for Unique permission, but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_loaded_maps() {
use crate::generated::bpf_map_info;

Expand Down
41 changes: 32 additions & 9 deletions aya/src/maps/perf/perf_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
fn test_no_out_bufs() {
let mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand All @@ -339,7 +338,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`unsafe { (*header).data_tail = tail as u64 };` is attempting a write access using using a tag that only grants SharedReadOnly permission"
)]
fn test_no_events() {
let mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand All @@ -355,7 +357,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_first_lost() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand Down Expand Up @@ -428,7 +433,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_first_sample() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand All @@ -446,7 +454,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_many_with_many_reads() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand All @@ -469,7 +480,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_many_with_one_read() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand All @@ -491,7 +505,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_last_sample() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand All @@ -511,7 +528,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_wrapping_sample_size() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand Down Expand Up @@ -540,7 +560,10 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(
miri,
ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location"
)]
fn test_read_wrapping_value() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
Expand Down
2 changes: 1 addition & 1 deletion aya/src/programs/links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(miri, ignore = "`mkdir` not available when isolation is enabled")]
fn test_pin() {
let dir = tempdir().unwrap();
let f1 = File::create(dir.path().join("f1")).expect("unable to create file in tmpdir");
Expand Down

0 comments on commit 35962a4

Please sign in to comment.