()
| 438 | |
| 439 | |
| 440 | def test_maps_for_binary_executable_with_bss(): |
| 441 | # GIVEN |
| 442 | |
| 443 | python = VirtualMap( |
| 444 | start=140728765599744, |
| 445 | end=140728765603840, |
| 446 | filesize=4096, |
| 447 | offset=0, |
| 448 | device="00:00", |
| 449 | flags="r-xp", |
| 450 | inode=0, |
| 451 | path=Path("the_executable"), |
| 452 | ) |
| 453 | |
| 454 | bss = VirtualMap( |
| 455 | start=139752898736128, |
| 456 | end=139752898887680, |
| 457 | filesize=4096, |
| 458 | offset=0, |
| 459 | device="08:12", |
| 460 | flags="r--p", |
| 461 | inode=8398159, |
| 462 | path=None, |
| 463 | ) |
| 464 | |
| 465 | maps = [ |
| 466 | python, |
| 467 | bss, |
| 468 | VirtualMap( |
| 469 | start=18446744073699065856, |
| 470 | end=18446744073699069952, |
| 471 | filesize=4096, |
| 472 | offset=0, |
| 473 | device="00:00", |
| 474 | flags="--xp", |
| 475 | inode=0, |
| 476 | path=Path("/usr/lib/libc-2.31.so"), |
| 477 | ), |
| 478 | ] |
| 479 | |
| 480 | # WHEN |
| 481 | |
| 482 | mapinfo = parse_maps_file_for_binary(Path("the_executable"), maps) |
| 483 | |
| 484 | # THEN |
| 485 | |
| 486 | assert mapinfo.python == python |
| 487 | assert mapinfo.libpython is None |
| 488 | assert mapinfo.bss == bss |
| 489 | assert mapinfo.heap is None |
| 490 | |
| 491 | |
| 492 | def test_maps_for_binary_libpython_with_bss(): |
nothing calls this directly
no test coverage detected