Differential D61687 Diff 200160 packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
Changeset View
Changeset View
Standalone View
Standalone View
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase): | ||||
# | # | ||||
# We skip the "supports_auxv" test on debugserver. The rest of the tests | # We skip the "supports_auxv" test on debugserver. The rest of the tests | ||||
# appropriately skip the auxv tests if the support flag is not present | # appropriately skip the auxv tests if the support flag is not present | ||||
# in the qSupported response, so the debugserver test bits are still there | # in the qSupported response, so the debugserver test bits are still there | ||||
# in case debugserver code one day does have auxv support and thus those | # in case debugserver code one day does have auxv support and thus those | ||||
# tests don't get skipped. | # tests don't get skipped. | ||||
# | # | ||||
@skipIfWindows # no auxv support. | |||||
@llgs_test | @llgs_test | ||||
def test_supports_auxv_llgs(self): | def test_supports_auxv_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.supports_auxv() | self.supports_auxv() | ||||
def auxv_data_is_correct_size(self): | def auxv_data_is_correct_size(self): | ||||
(word_size, auxv_data) = self.get_raw_auxv_data() | (word_size, auxv_data) = self.get_raw_auxv_data() | ||||
self.assertIsNotNone(auxv_data) | self.assertIsNotNone(auxv_data) | ||||
# Ensure auxv data is a multiple of 2*word_size (there should be two | # Ensure auxv data is a multiple of 2*word_size (there should be two | ||||
# unsigned long fields per auxv entry). | # unsigned long fields per auxv entry). | ||||
self.assertEqual(len(auxv_data) % (2 * word_size), 0) | self.assertEqual(len(auxv_data) % (2 * word_size), 0) | ||||
# print("auxv contains {} entries".format(len(auxv_data) / (2*word_size))) | # print("auxv contains {} entries".format(len(auxv_data) / (2*word_size))) | ||||
@debugserver_test | @debugserver_test | ||||
def test_auxv_data_is_correct_size_debugserver(self): | def test_auxv_data_is_correct_size_debugserver(self): | ||||
self.init_debugserver_test() | self.init_debugserver_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.auxv_data_is_correct_size() | self.auxv_data_is_correct_size() | ||||
@skipIfWindows | |||||
@llgs_test | @llgs_test | ||||
def test_auxv_data_is_correct_size_llgs(self): | def test_auxv_data_is_correct_size_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.auxv_data_is_correct_size() | self.auxv_data_is_correct_size() | ||||
def auxv_keys_look_valid(self): | def auxv_keys_look_valid(self): | ||||
Show All 22 Lines | class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase): | ||||
@debugserver_test | @debugserver_test | ||||
def test_auxv_keys_look_valid_debugserver(self): | def test_auxv_keys_look_valid_debugserver(self): | ||||
self.init_debugserver_test() | self.init_debugserver_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.auxv_keys_look_valid() | self.auxv_keys_look_valid() | ||||
@skipIfWindows | |||||
@llgs_test | @llgs_test | ||||
def test_auxv_keys_look_valid_llgs(self): | def test_auxv_keys_look_valid_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.auxv_keys_look_valid() | self.auxv_keys_look_valid() | ||||
def auxv_chunked_reads_work(self): | def auxv_chunked_reads_work(self): | ||||
Show All 31 Lines | class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase): | ||||
@debugserver_test | @debugserver_test | ||||
def test_auxv_chunked_reads_work_debugserver(self): | def test_auxv_chunked_reads_work_debugserver(self): | ||||
self.init_debugserver_test() | self.init_debugserver_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.auxv_chunked_reads_work() | self.auxv_chunked_reads_work() | ||||
@skipIfWindows | |||||
@llgs_test | @llgs_test | ||||
def test_auxv_chunked_reads_work_llgs(self): | def test_auxv_chunked_reads_work_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.set_inferior_startup_launch() | self.set_inferior_startup_launch() | ||||
self.auxv_chunked_reads_work() | self.auxv_chunked_reads_work() |