Commit 7bdc42f
authored
chore: add callback registration to
Resolves CORE-233.
A `passert` failure crashes the process without returning. While
`Catch2` has a `SIGABRT` handler to print some details around this,
`rapidcheck` does not. As such, if a randomized `rapidcheck` input fails
a `passert`, no details about what the input was are printed.
Ostensibly we have some means of recovering that failed input using the
seed which produced the test case, but this might not be helpful:
1) we don't know if it is platform-independent
2) if there is a non-deterministic or undefined behavior leading to
failure, then the seed may not be enough to clue us in
This pull request adds a callback registration to `passert_failure` so
that we can register a callback in our `rapidcheck` properties to print
the last attempted input in the event of a `passert` failure. This way
we can recover a bad input with certainty.
Example:
```
FATAL TileDB core library internal error: false
test/src/unit-sparse-global-order-reader.cc:1396
Last rapidcheck input: (2, 1, 1, [[1, 1]], d1 LT 0x01 0x00 0x00 0x00)
```
---
TYPE: NO_HISTORY
DESC: add callback registration to `passert_failure` to enable dumping
rapidcheck test inputpassert_failure to enable dumping rapidcheck test input (#5532)1 parent e6dfe4f commit 7bdc42f
File tree
3 files changed
+131
-3
lines changed- test/src
- tiledb/common
3 files changed
+131
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1314 | 1328 | | |
1315 | 1329 | | |
1316 | 1330 | | |
| |||
1335 | 1349 | | |
1336 | 1350 | | |
1337 | 1351 | | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1338 | 1356 | | |
1339 | 1357 | | |
1340 | 1358 | | |
| |||
1438 | 1456 | | |
1439 | 1457 | | |
1440 | 1458 | | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
1441 | 1463 | | |
1442 | 1464 | | |
1443 | 1465 | | |
| |||
1537 | 1559 | | |
1538 | 1560 | | |
1539 | 1561 | | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1540 | 1571 | | |
1541 | 1572 | | |
1542 | 1573 | | |
| |||
1656 | 1687 | | |
1657 | 1688 | | |
1658 | 1689 | | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
1659 | 1700 | | |
1660 | 1701 | | |
1661 | 1702 | | |
| |||
1817 | 1858 | | |
1818 | 1859 | | |
1819 | 1860 | | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
1820 | 1873 | | |
1821 | 1874 | | |
1822 | 1875 | | |
| |||
1981 | 2034 | | |
1982 | 2035 | | |
1983 | 2036 | | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
1984 | 2049 | | |
1985 | 2050 | | |
1986 | 2051 | | |
| |||
2128 | 2193 | | |
2129 | 2194 | | |
2130 | 2195 | | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
2131 | 2200 | | |
2132 | 2201 | | |
2133 | 2202 | | |
| |||
3072 | 3141 | | |
3073 | 3142 | | |
3074 | 3143 | | |
3075 | | - | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
3076 | 3149 | | |
3077 | 3150 | | |
3078 | 3151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
45 | 62 | | |
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
50 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
51 | 78 | | |
52 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
53 | 87 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
| |||
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | | - | |
| 212 | + | |
| 213 | + | |
207 | 214 | | |
208 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
209 | 230 | | |
210 | 231 | | |
211 | 232 | | |
| |||
0 commit comments