miri: Disable Stacked Borrows and skip some tests

The perf_buffer code fails due to stacked borrows, skip this for now.
munmap isn't supported by miri.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/67/head
Dave Tucker 3 years ago committed by Alessandro Decina
parent 93e9cd0e00
commit dc4b928ec5

@ -44,6 +44,8 @@ jobs:
popd popd
- name: Run miri - name: Run miri
env:
MIRIFLAGS: -Zmiri-disable-stacked-borrows
run: | run: |
cargo miri test cargo miri test
pushd bpf pushd bpf

@ -347,6 +347,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_no_out_bufs() { fn test_no_out_bufs() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -361,6 +362,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_no_events() { fn test_no_events() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -376,6 +378,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_first_lost() { fn test_read_first_lost() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -440,6 +443,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_first_sample() { fn test_read_first_sample() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -457,6 +461,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_many_with_many_reads() { fn test_read_many_with_many_reads() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -479,6 +484,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_many_with_one_read() { fn test_read_many_with_one_read() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -500,6 +506,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_last_sample() { fn test_read_last_sample() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -519,6 +526,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_wrapping_sample_size() { fn test_read_wrapping_sample_size() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],
@ -547,6 +555,7 @@ mod tests {
} }
#[test] #[test]
#[cfg_attr(miri, ignore)]
fn test_read_wrapping_value() { fn test_read_wrapping_value() {
let mut mmapped_buf = MMappedBuf { let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2], data: [0; PAGE_SIZE * 2],

Loading…
Cancel
Save