Lines Matching defs:elf
31 import pkg.elf as elf
54 """Test that elf routines gracefully handle non-elf objects."""
56 p = "this-is-not-an-elf-file.so"
59 self.assertEqual(elf.is_elf_object(p), False)
60 self.assertRaises(elf.ElfError, elf.get_dynamic, p)
61 self.assertRaises(elf.ElfError, elf.get_hashes, p)
62 self.assertRaises(elf.ElfError, elf.get_info, p)
65 """Test that elf routines gracefully handle ENOENT."""
69 self.assertRaises(OSError, elf.is_elf_object, p)
70 self.assertRaises(OSError, elf.get_dynamic, p)
71 self.assertRaises(OSError, elf.get_hashes, p)
72 self.assertRaises(OSError, elf.get_info, p)
75 """Test that elf routines work on a small set of objects."""
79 self.debug("testing elf file {0}".format(p))
81 self.assertEqual(elf.is_elf_object(p), True)
82 elf.get_dynamic(p)
83 elf.get_hashes(p)
84 elf.get_info(p)
97 d = elf.get_hashes(self.elf_paths[0])
107 d = elf.get_hashes(self.elf_paths[0],
129 d = elf.get_hashes(self.elf_paths[0], elfhash=False,