Commit d700506
committed
test/osd: Adapt strategy for testing asserts in interval_sets
Previously the strategy for testing interval_sets was to use a gtest
feature called "EXPECT_DEATH" This is, however, slow and creates
core dumps. Instead, we use a mechanism which replaces the
ceph_assert macro with a strict_assert, which behaves the same in
product code, but in the unit test can be tested using the faster
EXPECT_THROW() mechanism in gtest.
Signed-off-by: Alex Ainscow <[email protected]>1 parent 855faf1 commit d700506
2 files changed
+27
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
| |||
362 | 370 | | |
363 | 371 | | |
364 | 372 | | |
365 | | - | |
| 373 | + | |
366 | 374 | | |
367 | 375 | | |
368 | 376 | | |
| |||
556 | 564 | | |
557 | 565 | | |
558 | 566 | | |
559 | | - | |
| 567 | + | |
560 | 568 | | |
561 | 569 | | |
562 | 570 | | |
| |||
572 | 580 | | |
573 | 581 | | |
574 | 582 | | |
575 | | - | |
| 583 | + | |
576 | 584 | | |
577 | 585 | | |
578 | 586 | | |
| |||
586 | 594 | | |
587 | 595 | | |
588 | 596 | | |
589 | | - | |
| 597 | + | |
590 | 598 | | |
591 | 599 | | |
592 | 600 | | |
| |||
677 | 685 | | |
678 | 686 | | |
679 | 687 | | |
680 | | - | |
681 | | - | |
| 688 | + | |
| 689 | + | |
682 | 690 | | |
683 | 691 | | |
684 | | - | |
| 692 | + | |
685 | 693 | | |
686 | 694 | | |
687 | 695 | | |
| |||
999 | 1007 | | |
1000 | 1008 | | |
1001 | 1009 | | |
| 1010 | + | |
1002 | 1011 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
| |||
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
0 commit comments