59 uint8_t *ptr =
nullptr;
60 MemBackdoor remapped_backdoor(remappedRanges[0], ptr,
61 MemBackdoor::Flags::Readable);
63 getRevertedBackdoor(&remapped_backdoor, pkt_range);
65 EXPECT_EQ(reverted_backdoor->
range(), originalRanges[0]);
66 EXPECT_EQ(reverted_backdoor->
ptr(), ptr);
67 ASSERT_EQ(backdoorLists[0].size(), 1);
68 EXPECT_EQ(backdoorLists[0].begin()->get(), reverted_backdoor);
75 EXPECT_EQ(backdoorLists[0].size(), 0);
88 remappedRanges[0].start() - diff,
89 remappedRanges[0].end() + diff);
91 uint8_t *ptr =
nullptr;
92 MemBackdoor remapped_backdoor(remapped_backdoor_range, ptr,
93 MemBackdoor::Flags::Readable);
95 getRevertedBackdoor(&remapped_backdoor, pkt_range);
97 EXPECT_EQ(reverted_backdoor->
range(), originalRanges[0]);
98 EXPECT_EQ(reverted_backdoor->
ptr(), ptr + diff);
109 Addr mid = originalRanges[0].start() + originalRanges[0].size() / 2;
117 uint8_t *ptr =
nullptr;
118 MemBackdoor remapped_backdoor(remappedRanges[0], ptr,
119 MemBackdoor::Flags::Readable);
124 getRevertedBackdoor(&remapped_backdoor, pkt_range_0);
125 EXPECT_EQ(backdoorLists[0].size(), 1);
132 getRevertedBackdoor(&remapped_backdoor, pkt_range_1);
133 EXPECT_EQ(reverted_backdoor_0, reverted_backdoor_1);
134 EXPECT_EQ(backdoorLists[0].size(), 1);