Skip to content

Commit 5036cae

Browse files
fix(bin_tests): race conditions between concurrent tests (#1402)
fix(bin_tests): race conditions between concurrent tests test: skip serial_tests in miri as they leak Co-authored-by: gyuheon.oh <[email protected]>
1 parent 73c675b commit 5036cae

File tree

6 files changed

+55
-2
lines changed

6 files changed

+55
-2
lines changed

Cargo.lock

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE-3rdparty.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27494,9 +27494,9 @@ third_party_libraries:
2749427494
- package_name: stringmetrics
2749527495
package_version: 2.2.2
2749627496
repository: https://github.com/pluots/stringmetrics
27497-
license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-1949cf8c6b5b557f/stringmetrics-2.2.2/LICENSE)
27497+
license: License specified in file ($CARGO_HOME/registry/src/github.com-25cdd57fae9f0462/stringmetrics-2.2.2/LICENSE)
2749827498
licenses:
27499-
- license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-1949cf8c6b5b557f/stringmetrics-2.2.2/LICENSE)
27499+
- license: License specified in file ($CARGO_HOME/registry/src/github.com-25cdd57fae9f0462/stringmetrics-2.2.2/LICENSE)
2750027500
text: |
2750127501
Copyright 2022 Trevor Gross
2750227502

bin_tests/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ nix = { version = "0.29", features = ["signal", "socket"] }
2424
hex = "0.4"
2525
os_info = "3.7.0"
2626

27+
[dev-dependencies]
28+
serial_test = "3.2"
29+
2730
[lib]
2831
bench = false
2932

bin_tests/src/modes/unix/test_010_runtime_callback_frame.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ unsafe extern "C" fn test_runtime_callback_frame(
8585
mod tests {
8686
use super::*;
8787
use libdd_crashtracker::{clear_runtime_callback, is_runtime_callback_registered};
88+
use serial_test::serial;
8889

8990
#[test]
91+
#[cfg_attr(miri, ignore)] // serial_test has intentional leaks that Miri flags
92+
#[serial(runtime_callback)]
9093
fn test_runtime_callback_frame_registration() {
9194
// Ensure clean state
9295
unsafe {

bin_tests/src/modes/unix/test_011_runtime_callback_string.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ unsafe extern "C" fn test_runtime_callback_string(
5252
mod tests {
5353
use super::*;
5454
use libdd_crashtracker::{clear_runtime_callback, is_runtime_callback_registered};
55+
use serial_test::serial;
5556

5657
#[test]
58+
#[cfg_attr(miri, ignore)] // serial_test has intentional leaks that Miri flags
59+
#[serial(runtime_callback)]
5760
fn test_runtime_callback_string_registration() {
5861
unsafe {
5962
clear_runtime_callback();

bin_tests/src/modes/unix/test_012_runtime_callback_frame_invalid_utf8.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,11 @@ unsafe extern "C" fn test_runtime_callback_frame_with_invalid_utf8(
136136
mod tests {
137137
use super::*;
138138
use libdd_crashtracker::{clear_runtime_callback, is_runtime_callback_registered};
139+
use serial_test::serial;
139140

140141
#[test]
142+
#[cfg_attr(miri, ignore)] // serial_test has intentional leaks that Miri flags
143+
#[serial(runtime_callback)]
141144
fn test_runtime_callback_frame_invalid_utf8_registration() {
142145
// Ensure clean state
143146
unsafe {

0 commit comments

Comments
 (0)