Skip to content

Commit fda754e

Browse files
committed
Exclude a few tests from Miri
Miri won’t allow Command::new() due to isolation restrictions.
1 parent bf83741 commit fda754e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/checksum_integration_tests.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::fs;
66
use std::process::Command;
77

88
#[test]
9+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
910
fn test_benchmark_flag_parsing() {
1011
let output = Command::new("cargo")
1112
.args(&[
@@ -33,6 +34,7 @@ fn test_benchmark_flag_parsing() {
3334
}
3435

3536
#[test]
37+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
3638
fn test_benchmark_with_size_parameter() {
3739
let output = Command::new("cargo")
3840
.args(&[
@@ -57,6 +59,7 @@ fn test_benchmark_with_size_parameter() {
5759
}
5860

5961
#[test]
62+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
6063
fn test_benchmark_with_duration_parameter() {
6164
let output = Command::new("cargo")
6265
.args(&[
@@ -81,6 +84,7 @@ fn test_benchmark_with_duration_parameter() {
8184
}
8285

8386
#[test]
87+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
8488
fn test_benchmark_invalid_size() {
8589
let output = Command::new("cargo")
8690
.args(&[
@@ -105,6 +109,7 @@ fn test_benchmark_invalid_size() {
105109
}
106110

107111
#[test]
112+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
108113
fn test_benchmark_invalid_duration() {
109114
let output = Command::new("cargo")
110115
.args(&[
@@ -129,6 +134,7 @@ fn test_benchmark_invalid_duration() {
129134
}
130135

131136
#[test]
137+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
132138
fn test_benchmark_with_file_input() {
133139
// Create a temporary test file
134140
let test_file = "test_benchmark_file.txt";
@@ -162,6 +168,7 @@ fn test_benchmark_with_file_input() {
162168
}
163169

164170
#[test]
171+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
165172
fn test_benchmark_with_string_input() {
166173
let output = Command::new("cargo")
167174
.args(&[
@@ -188,6 +195,7 @@ fn test_benchmark_with_string_input() {
188195
}
189196

190197
#[test]
198+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
191199
fn test_benchmark_different_algorithms() {
192200
let algorithms = ["CRC-32/ISCSI", "CRC-64/NVME"];
193201

@@ -220,6 +228,7 @@ fn test_benchmark_different_algorithms() {
220228
}
221229

222230
#[test]
231+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
223232
fn test_benchmark_size_without_benchmark_flag() {
224233
let output = Command::new("cargo")
225234
.args(&[
@@ -243,6 +252,7 @@ fn test_benchmark_size_without_benchmark_flag() {
243252
}
244253

245254
#[test]
255+
#[cfg_attr(miri, ignore)] // Miri doesn't allow this due to isolation restrictions
246256
fn test_benchmark_nonexistent_file() {
247257
let output = Command::new("cargo")
248258
.args(&[

0 commit comments

Comments
 (0)