()
| 566 | |
| 567 | |
| 568 | def test_maps_for_binary_libpython_without_bss(): |
| 569 | # GIVEN |
| 570 | |
| 571 | python = VirtualMap( |
| 572 | start=140728765599744, |
| 573 | end=140728765603840, |
| 574 | filesize=4096, |
| 575 | offset=0, |
| 576 | device="00:00", |
| 577 | flags="r-xp", |
| 578 | inode=0, |
| 579 | path=Path("the_executable"), |
| 580 | ) |
| 581 | |
| 582 | bss = VirtualMap( |
| 583 | start=139752898736128, |
| 584 | end=139752898887680, |
| 585 | filesize=4096, |
| 586 | offset=0, |
| 587 | device="08:12", |
| 588 | flags="r--p", |
| 589 | inode=8398159, |
| 590 | path=None, |
| 591 | ) |
| 592 | |
| 593 | libpython = VirtualMap( |
| 594 | start=140728765587456, |
| 595 | end=140728765599744, |
| 596 | filesize=4096, |
| 597 | offset=0, |
| 598 | device="00:00", |
| 599 | flags="r--p", |
| 600 | inode=0, |
| 601 | path=Path("/some/path/to/libpython.so"), |
| 602 | ) |
| 603 | |
| 604 | maps = [ |
| 605 | python, |
| 606 | bss, |
| 607 | VirtualMap( |
| 608 | start=18446744073699065856, |
| 609 | end=18446744073699069952, |
| 610 | filesize=4096, |
| 611 | offset=0, |
| 612 | device="00:00", |
| 613 | flags="--xp", |
| 614 | inode=0, |
| 615 | path=Path("/usr/lib/libc-2.31.so"), |
| 616 | ), |
| 617 | libpython, |
| 618 | ] |
| 619 | |
| 620 | # WHEN |
| 621 | |
| 622 | mapinfo = parse_maps_file_for_binary(Path("the_executable"), maps) |
| 623 | |
| 624 | # THEN |
| 625 |
nothing calls this directly
no test coverage detected