You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
750 B
31 lines
750 B
"""
|
|
Test loading of a kext binary.
|
|
"""
|
|
|
|
|
|
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class LoadKextTestCase(TestBase):
|
|
NO_DEBUG_INFO_TESTCASE = True
|
|
|
|
mydir = TestBase.compute_mydir(__file__)
|
|
|
|
def test_load_kext(self):
|
|
"""Test that lldb can load a kext binary."""
|
|
|
|
# Create kext from YAML.
|
|
self.yaml2obj("mykext.yaml", self.getBuildArtifact("mykext"))
|
|
|
|
target = self.dbg.CreateTarget(self.getBuildArtifact("mykext"))
|
|
|
|
self.assertTrue(target.IsValid())
|
|
|
|
self.assertEqual(target.GetNumModules(), 1)
|
|
mod = target.GetModuleAtIndex(0)
|
|
self.assertEqual(mod.GetFileSpec().GetFilename(), "mykext")
|