Skip to content

Commit f3576de

Browse files
committed
capi: Run more tests in Miri
Now that we are tagging tests eligible for running under Miri it is much easier to onboard new ones. Add a bunch. Signed-off-by: Daniel Müller <[email protected]>
1 parent e0cffec commit f3576de

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

capi/src/inspect.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ mod tests {
400400
}
401401

402402
/// Exercise the `Debug` representation of various types.
403+
#[tag(miri)]
403404
#[test]
404405
fn debug_repr() {
405406
let elf = blaze_inspect_elf_src {
@@ -474,6 +475,7 @@ mod tests {
474475

475476
/// Check that we can properly convert a "syms list" into the corresponding
476477
/// C representation.
478+
#[tag(miri)]
477479
#[test]
478480
fn syms_list_conversion() {
479481
fn test(syms: Vec<Vec<SymInfo>>) {
@@ -585,6 +587,7 @@ mod tests {
585587
}
586588

587589
/// Make sure that we can create and free an inspector instance.
590+
#[tag(miri)]
588591
#[test]
589592
fn inspector_creation() {
590593
let inspector = blaze_inspector_new();

capi/src/symbolize.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,10 +1010,13 @@ mod tests {
10101010

10111011
use tempfile::tempdir;
10121012

1013+
use test_tag::tag;
1014+
10131015
use crate::blaze_err_last;
10141016

10151017

10161018
/// Check that various types have expected sizes.
1019+
#[tag(miri)]
10171020
#[test]
10181021
#[cfg(target_pointer_width = "64")]
10191022
fn type_sizes() {
@@ -1029,6 +1032,7 @@ mod tests {
10291032
}
10301033

10311034
/// Exercise the `Debug` representation of various types.
1035+
#[tag(miri)]
10321036
#[test]
10331037
fn debug_repr() {
10341038
let elf = blaze_symbolize_src_elf {
@@ -1134,6 +1138,7 @@ mod tests {
11341138

11351139
/// Check that we can convert a [`blaze_symbolize_src_kernel`]
11361140
/// reference into a [`Kernel`].
1141+
#[tag(miri)]
11371142
#[test]
11381143
fn kernel_conversion() {
11391144
let kernel = blaze_symbolize_src_kernel::default();
@@ -1154,6 +1159,7 @@ mod tests {
11541159
}
11551160

11561161
/// Test the Rust to C symbol conversion.
1162+
#[tag(miri)]
11571163
#[test]
11581164
fn symbol_conversion() {
11591165
fn touch<X: Clone>(x: &X) {
@@ -1278,6 +1284,7 @@ mod tests {
12781284
}
12791285

12801286
/// Make sure that we can create and free a symbolizer instance.
1287+
#[tag(miri)]
12811288
#[test]
12821289
fn symbolizer_creation() {
12831290
let symbolizer = blaze_symbolizer_new();
@@ -1286,6 +1293,7 @@ mod tests {
12861293

12871294
/// Make sure that we can create and free a symbolizer instance with the
12881295
/// provided options.
1296+
#[tag(miri)]
12891297
#[test]
12901298
fn symbolizer_creation_with_opts() {
12911299
let opts = blaze_symbolizer_opts {

0 commit comments

Comments
 (0)