Files
clang-p2996/lldb/test/API/macosx/load-kext/TestLoadKext.py
Dave Lee 4cc8f2a017 [lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
2022-06-17 14:34:49 -07:00

29 lines
704 B
Python

"""
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
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")