()
| 862 | |
| 863 | |
| 864 | def test_maps_for_binary_no_executable_segment(): |
| 865 | # GIVEN |
| 866 | |
| 867 | python = VirtualMap( |
| 868 | start=140728765599744, |
| 869 | end=140728765603840, |
| 870 | filesize=4096, |
| 871 | offset=0, |
| 872 | device="00:00", |
| 873 | flags="r--p", |
| 874 | inode=0, |
| 875 | path=Path("the_executable"), |
| 876 | ) |
| 877 | |
| 878 | maps = [ |
| 879 | python, |
| 880 | VirtualMap( |
| 881 | start=18446744073699065856, |
| 882 | end=18446744073699069952, |
| 883 | filesize=4096, |
| 884 | offset=0, |
| 885 | device="00:00", |
| 886 | flags="--xp", |
| 887 | inode=0, |
| 888 | path=Path("/usr/lib/libc-2.31.so"), |
| 889 | ), |
| 890 | ] |
| 891 | |
| 892 | # WHEN |
| 893 | |
| 894 | mapinfo = parse_maps_file_for_binary(Path("the_executable"), maps) |
| 895 | |
| 896 | # THEN |
| 897 | |
| 898 | assert mapinfo.python == python |
| 899 | assert mapinfo.libpython is None |
| 900 | assert mapinfo.bss is None |
| 901 | assert mapinfo.heap is None |
| 902 | |
| 903 | |
| 904 | def test_maps_for_binary_multiple_libpythons(): |
nothing calls this directly
no test coverage detected