فهرست منبع

Document miri skip reasons

Tamir Duberstein 10 ماه پیش
والد
کامیت
35962a4
4فایلهای تغییر یافته به همراه42 افزوده شده و 19 حذف شده
  1. 1 1
      aya-obj/src/btf/btf.rs
  2. 8 8
      aya/src/maps/mod.rs
  3. 32 9
      aya/src/maps/perf/perf_buffer.rs
  4. 1 1
      aya/src/programs/links.rs

+ 1 - 1
aya-obj/src/btf/btf.rs

@@ -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

+ 8 - 8
aya/src/maps/mod.rs

@@ -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;
 
@@ -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;
 

+ 32 - 9
aya/src/maps/perf/perf_buffer.rs

@@ -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],
@@ -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],
@@ -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],
@@ -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],
@@ -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],
@@ -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],
@@ -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],
@@ -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],
@@ -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],

+ 1 - 1
aya/src/programs/links.rs

@@ -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");