(self)
| 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 | |
| 196 | if __name__ == "__main__": |
| 197 | main() |
nothing calls this directly
no test coverage detected