MCPcopy Create free account
hub / github.com/iovisor/bcc / test_bpf_isa

Method test_bpf_isa

tests/python/test_disassembler.py:185–194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

183 b.decode_table(b"test_map"))
184
185 def test_bpf_isa(self):
186 for op, instr_fmt in self.opcodes:
187 instr_fmt
188 if instr_fmt is None:
189 continue
190 instr = self.build_instr(op)
191 instr_str = ct.string_at(ct.addressof(instr), ct.sizeof(instr))
192 target_text = self.format_instr(instr, instr_fmt)
193 self.assertEqual(disassembler.disassemble_str(instr_str)[0],
194 "%4d: (%02x) %s" % (0, op, target_text))
195
196if __name__ == "__main__":
197 main()

Callers

nothing calls this directly

Calls 2

build_instrMethod · 0.95
format_instrMethod · 0.95

Tested by

no test coverage detected