MCPcopy Create free account
hub / github.com/bloomberg/pystack / test_get_base_map_path_existing

Function test_get_base_map_path_existing

tests/unit/test_maps.py:1105–1134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1103
1104
1105def test_get_base_map_path_existing():
1106 # GIVEN
1107 maps = [
1108 VirtualMap(
1109 start=140728765599744,
1110 end=140728765603840,
1111 filesize=4096,
1112 offset=0,
1113 device="00:00",
1114 flags="r-xp",
1115 inode=0,
1116 path=None,
1117 ),
1118 VirtualMap(
1119 start=18446744073699065856,
1120 end=18446744073699069952,
1121 filesize=4096,
1122 offset=0,
1123 device="00:00",
1124 flags="--xp",
1125 inode=0,
1126 path=Path("/usr/lib/libc-2.31.so"),
1127 ),
1128 ]
1129
1130 # WHEN
1131 base_map = _get_base_map(maps)
1132
1133 # THEN
1134 assert base_map == maps[1]
1135
1136
1137def test_get_base_map_path_not_existing():

Callers

nothing calls this directly

Calls 2

VirtualMapClass · 0.90
_get_base_mapFunction · 0.90

Tested by

no test coverage detected