Skip to content

Commit 2788afe

Browse files
author
zhuyunxing
committed
coverage. Gate mcdc tests by @min-llvm-version
1 parent 58f62e8 commit 2788afe

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

tests/coverage/mcdc_if.cov-map

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Function name: mcdc_if::mcdc_check_a
2-
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 0e, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
2+
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 0f, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 4
@@ -8,7 +8,7 @@ Number of expressions: 4
88
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
99
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
1010
Number of file 0 mappings: 8
11-
- Code(Counter(0)) at (prev + 14, 1) to (start + 1, 9)
11+
- Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
1212
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
1313
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
1414
true = c1
@@ -24,7 +24,7 @@ Number of file 0 mappings: 8
2424
= (c3 + (c2 + (c0 - c1)))
2525

2626
Function name: mcdc_if::mcdc_check_b
27-
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 16, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
27+
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 17, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
2828
Number of files: 1
2929
- file 0 => global file 1
3030
Number of expressions: 4
@@ -33,7 +33,7 @@ Number of expressions: 4
3333
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
3434
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
3535
Number of file 0 mappings: 8
36-
- Code(Counter(0)) at (prev + 22, 1) to (start + 1, 9)
36+
- Code(Counter(0)) at (prev + 23, 1) to (start + 1, 9)
3737
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
3838
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
3939
true = c1
@@ -49,7 +49,7 @@ Number of file 0 mappings: 8
4949
= (c3 + (c2 + (c0 - c1)))
5050

5151
Function name: mcdc_if::mcdc_check_both
52-
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 1e, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
52+
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 1f, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
5353
Number of files: 1
5454
- file 0 => global file 1
5555
Number of expressions: 4
@@ -58,7 +58,7 @@ Number of expressions: 4
5858
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
5959
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
6060
Number of file 0 mappings: 8
61-
- Code(Counter(0)) at (prev + 30, 1) to (start + 1, 9)
61+
- Code(Counter(0)) at (prev + 31, 1) to (start + 1, 9)
6262
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
6363
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
6464
true = c1
@@ -74,7 +74,7 @@ Number of file 0 mappings: 8
7474
= (c3 + (c2 + (c0 - c1)))
7575

7676
Function name: mcdc_if::mcdc_check_neither
77-
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 06, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
77+
Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 07, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
7878
Number of files: 1
7979
- file 0 => global file 1
8080
Number of expressions: 4
@@ -83,7 +83,7 @@ Number of expressions: 4
8383
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
8484
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
8585
Number of file 0 mappings: 8
86-
- Code(Counter(0)) at (prev + 6, 1) to (start + 1, 9)
86+
- Code(Counter(0)) at (prev + 7, 1) to (start + 1, 9)
8787
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
8888
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
8989
true = c1
@@ -99,7 +99,7 @@ Number of file 0 mappings: 8
9999
= (c3 + (c2 + (c0 - c1)))
100100

101101
Function name: mcdc_if::mcdc_check_not_tree_decision
102-
Raw bytes (87): 0x[01, 01, 08, 01, 05, 02, 09, 05, 09, 0d, 1e, 02, 09, 11, 1b, 0d, 1e, 02, 09, 0a, 01, 30, 01, 03, 0a, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 1e, 03, 02, 00, 00, 0e, 00, 0f, 0b, 00, 14, 00, 15, 30, 11, 0d, 02, 00, 00, 00, 14, 00, 15, 11, 00, 16, 02, 06, 1b, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
102+
Raw bytes (87): 0x[01, 01, 08, 01, 05, 02, 09, 05, 09, 0d, 1e, 02, 09, 11, 1b, 0d, 1e, 02, 09, 0a, 01, 31, 01, 03, 0a, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 1e, 03, 02, 00, 00, 0e, 00, 0f, 0b, 00, 14, 00, 15, 30, 11, 0d, 02, 00, 00, 00, 14, 00, 15, 11, 00, 16, 02, 06, 1b, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
103103
Number of files: 1
104104
- file 0 => global file 1
105105
Number of expressions: 8
@@ -112,7 +112,7 @@ Number of expressions: 8
112112
- expression 6 operands: lhs = Counter(3), rhs = Expression(7, Sub)
113113
- expression 7 operands: lhs = Expression(0, Sub), rhs = Counter(2)
114114
Number of file 0 mappings: 10
115-
- Code(Counter(0)) at (prev + 48, 1) to (start + 3, 10)
115+
- Code(Counter(0)) at (prev + 49, 1) to (start + 3, 10)
116116
- MCDCDecision { bitmap_idx: 0, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
117117
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 3 } at (prev + 0, 9) to (start + 0, 10)
118118
true = c1
@@ -134,7 +134,7 @@ Number of file 0 mappings: 10
134134
= (c4 + (c3 + ((c0 - c1) - c2)))
135135

136136
Function name: mcdc_if::mcdc_check_tree_decision
137-
Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 0d, 05, 0d, 0d, 11, 09, 02, 1b, 1f, 0d, 11, 09, 02, 0a, 01, 26, 01, 03, 09, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 0d, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 11, 09, 03, 00, 00, 00, 13, 00, 14, 1b, 00, 16, 02, 06, 1f, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
137+
Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 0d, 05, 0d, 0d, 11, 09, 02, 1b, 1f, 0d, 11, 09, 02, 0a, 01, 27, 01, 03, 09, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 0d, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 11, 09, 03, 00, 00, 00, 13, 00, 14, 1b, 00, 16, 02, 06, 1f, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
138138
Number of files: 1
139139
- file 0 => global file 1
140140
Number of expressions: 8
@@ -147,7 +147,7 @@ Number of expressions: 8
147147
- expression 6 operands: lhs = Counter(3), rhs = Counter(4)
148148
- expression 7 operands: lhs = Counter(2), rhs = Expression(0, Sub)
149149
Number of file 0 mappings: 10
150-
- Code(Counter(0)) at (prev + 38, 1) to (start + 3, 9)
150+
- Code(Counter(0)) at (prev + 39, 1) to (start + 3, 9)
151151
- MCDCDecision { bitmap_idx: 0, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
152152
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
153153
true = c1
@@ -169,7 +169,7 @@ Number of file 0 mappings: 10
169169
= ((c3 + c4) + (c2 + (c0 - c1)))
170170

171171
Function name: mcdc_if::mcdc_nested_if
172-
Raw bytes (124): 0x[01, 01, 0d, 01, 05, 02, 09, 05, 09, 1b, 15, 05, 09, 1b, 15, 05, 09, 11, 15, 02, 09, 2b, 32, 0d, 2f, 11, 15, 02, 09, 0e, 01, 3a, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 32, 02, 00, 00, 00, 0d, 00, 0e, 1b, 01, 09, 01, 0d, 28, 01, 02, 01, 0c, 00, 12, 30, 16, 15, 01, 02, 00, 00, 0c, 00, 0d, 16, 00, 11, 00, 12, 30, 0d, 11, 02, 00, 00, 00, 11, 00, 12, 0d, 00, 13, 02, 0a, 2f, 02, 0a, 00, 0b, 32, 01, 0c, 02, 06, 27, 03, 01, 00, 02]
172+
Raw bytes (124): 0x[01, 01, 0d, 01, 05, 02, 09, 05, 09, 1b, 15, 05, 09, 1b, 15, 05, 09, 11, 15, 02, 09, 2b, 32, 0d, 2f, 11, 15, 02, 09, 0e, 01, 3b, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 32, 02, 00, 00, 00, 0d, 00, 0e, 1b, 01, 09, 01, 0d, 28, 01, 02, 01, 0c, 00, 12, 30, 16, 15, 01, 02, 00, 00, 0c, 00, 0d, 16, 00, 11, 00, 12, 30, 0d, 11, 02, 00, 00, 00, 11, 00, 12, 0d, 00, 13, 02, 0a, 2f, 02, 0a, 00, 0b, 32, 01, 0c, 02, 06, 27, 03, 01, 00, 02]
173173
Number of files: 1
174174
- file 0 => global file 1
175175
Number of expressions: 13
@@ -187,7 +187,7 @@ Number of expressions: 13
187187
- expression 11 operands: lhs = Counter(4), rhs = Counter(5)
188188
- expression 12 operands: lhs = Expression(0, Sub), rhs = Counter(2)
189189
Number of file 0 mappings: 14
190-
- Code(Counter(0)) at (prev + 58, 1) to (start + 1, 9)
190+
- Code(Counter(0)) at (prev + 59, 1) to (start + 1, 9)
191191
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
192192
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 8) to (start + 0, 9)
193193
true = c1

tests/coverage/mcdc_if.coverage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
LL| |#![feature(coverage_attribute)]
22
LL| |//@ edition: 2021
3+
LL| |//@ min-llvm-version: 18
34
LL| |//@ compile-flags: -Zcoverage-options=mcdc
45
LL| |//@ llvm-cov-flags: --show-mcdc
56
LL| |

tests/coverage/mcdc_if.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(coverage_attribute)]
22
//@ edition: 2021
3+
//@ min-llvm-version: 18
34
//@ compile-flags: -Zcoverage-options=mcdc
45
//@ llvm-cov-flags: --show-mcdc
56

0 commit comments

Comments
 (0)