Skip to content

Commit 098a3cb

Browse files
author
Leo Alt
committed
adjust tests for nondeterminism
1 parent 1655626 commit 098a3cb

12 files changed

+22
-14
lines changed

test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_2.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ contract C {
1414
}
1515
// ====
1616
// SMTEngine: all
17+
// SMTIgnoreCex: yes
1718
// ----
18-
// Warning 4984: (266-272): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.\nCounterexample:\nx = 115792089237316195423570985008687907853269984665640564039457584007913129639926, once = true\n\nTransaction trace:\nC.constructor(){ msg.value: 28100 }\nState: x = 115792089237316195423570985008687907853269984665640564039457584007913129639926, once = false\nC.f(){ msg.value: 8 }
19-
// Warning 6328: (235-273): CHC: Assertion violation happens here.\nCounterexample:\nx = 0, once = true\n\nTransaction trace:\nC.constructor(){ msg.value: 0 }\nState: x = 0, once = false\nC.f(){ msg.value: 2 }
19+
// Warning 4984: (266-272): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
20+
// Warning 6328: (235-273): CHC: Assertion violation happens here.
2021
// Info 1180: Contract invariant(s) for :C:\nonce\n

test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_2.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ contract C {
99
// ====
1010
// SMTEngine: all
1111
// SMTIgnoreCex: yes
12+
// SMTIgnoreInv: yes
1213
// ----
1314
// Warning 9302: (82-93): Return value of low-level calls not used.
1415
// Warning 6328: (97-131): CHC: Assertion violation happens here.
15-
// Info 1180: Reentrancy property(ies) for :C:\n((((:var 1).balances[address(this)] + ((- 1) * (:var 0).balances[address(this)])) <= 0) && !(<errorCode> >= 2))\n<errorCode> = 0 -> no errors\n<errorCode> = 1 -> Assertion failed at assert(address(this).balance == x)\n<errorCode> = 2 -> Assertion failed at assert(address(this).balance >= x)\n

test/libsolidity/smtCheckerTests/external_calls/call_mutex_unsafe.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ contract C {
2121
}
2222
// ====
2323
// SMTEngine: all
24+
// SMTIgnoreCex: yes
2425
// ----
2526
// Warning 9302: (212-228): Return value of low-level calls not used.
26-
// Warning 6328: (232-246): CHC: Assertion violation happens here.\nCounterexample:\nx = 1, lock = false\n_a = 0x0\ny = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0, lock = false\nC.f(0x0)\n _a.call("aaaaa") -- untrusted external call, synthesized as:\n C.set(1) -- reentrant call
27+
// Warning 6328: (232-246): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/external_calls/external_call_with_value_2.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ contract C {
1212
}
1313
// ====
1414
// SMTEngine: all
15+
// SMTIgnoreCex: yes
1516
// ----
1617
// Warning 6328: (150-186): CHC: Assertion violation might happen here.
1718
// Warning 6328: (205-240): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_3.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@ contract C {
4040
}
4141
// ====
4242
// SMTEngine: all
43-
// ----
44-
// Info 1180: Contract invariant(s) for :C:\n((insidef || (z <= 0)) && (y <= 0))\nReentrancy property(ies) for :C:\n((!insidef || !(<errorCode> >= 2)) && (insidef' || !insidef) && (!(y <= 0) || (y' <= 0)))\n((!insidef || !(<errorCode> >= 3)) && (insidef' || !insidef))\n<errorCode> = 0 -> no errors\n<errorCode> = 2 -> Assertion failed at assert(z == y)\n<errorCode> = 3 -> Assertion failed at assert(prevOwner == owner)\n
43+
// SMTIgnoreInv: yes

test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_indirect.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ contract C {
4242
// ====
4343
// SMTEngine: all
4444
// SMTIgnoreCex: yes
45+
// SMTIgnoreOS: macos
4546
// ----
4647
// Warning 1218: (437-463): CHC: Error trying to invoke SMT solver.
4748
// Warning 6328: (419-433): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/file_level/import.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ contract C {
2121
}
2222
// ====
2323
// SMTEngine: all
24+
// SMTIgnoreCex: yes
2425
// ----
25-
// Warning 6328: (B:238-252): CHC: Assertion violation happens here.\nCounterexample:\ndata = {x: 21238}\nx = 8\ny = 21238\n\nTransaction trace:\nC.constructor()\nState: data = {x: 0}\nC.g()\n C.f(7) -- internal call\n A:set({x: 0}, 7) -- internal call\n A:set({x: 8}, 8) -- internal call
26-
// Warning 6328: (B:308-322): CHC: Assertion violation happens here.\nCounterexample:\ndata = {x: 6}\nx = 0\ny = 6\n\nTransaction trace:\nC.constructor()\nState: data = {x: 0}\nC.g()\n C.f(7) -- internal call\n A:set({x: 0}, 7) -- internal call\n A:set({x: 0}, 8) -- internal call
26+
// Warning 6328: (B:238-252): CHC: Assertion violation happens here.
27+
// Warning 6328: (B:308-322): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/operators/assignment_contract_member_variable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ contract A {
2727
// ====
2828
// SMTEngine: all
2929
// SMTIgnoreCex: yes
30+
// SMTIgnoreInv: yes
3031
// ----
3132
// Warning 6328: (392-408): CHC: Assertion violation happens here.
32-
// Info 1180: Contract invariant(s) for :A:\n(((x = (- 2)) && (y = (- 2))) || ((x = 0) && (y = 0)))\n

test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ contract C
1010
}
1111
// ====
1212
// SMTEngine: all
13+
// SMTIgnoreCex: yes
1314
// ----
14-
// Warning 6328: (180-204): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0x52f6\nb = 0x52f6\n\nTransaction trace:\nC.constructor()\nC.f(0x52f6, 0x52f6)
15+
// Warning 6328: (180-204): CHC: Assertion violation happens here.
1516
// Warning 1236: (101-116): BMC: Insufficient funds happens here.
1617
// Warning 1236: (120-136): BMC: Insufficient funds happens here.

test/libsolidity/smtCheckerTests/types/mapping_equal_keys_2.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ contract C
88
}
99
// ====
1010
// SMTEngine: all
11+
// SMTIgnoreCex: yes
1112
// ----
12-
// Warning 6328: (86-100): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 1\ny = 0\n\nTransaction trace:\nC.constructor()\nC.f(1, 0)
13+
// Warning 6328: (86-100): CHC: Assertion violation happens here.

0 commit comments

Comments
 (0)