Skip to content

Commit a825114

Browse files
authored
[android] move to newer llvm ref and NDK for lldb tests (#158)
## Purpose Move to a newer revision of llvm-project for the lldb test suite run against ds2 on Linux and Android. The new revision contains the fix llvm/llvm-project@18b9d49 which lets us also move to a newer Android NDK (>r21). Resolves #156 ## Overview * Move to a newer llvm-project ref that includes llvm/llvm-project@18b9d49 * Remove the dependency on nttld/setup-ndk@v1 for NDK and instead use the pre-installed Android NDK already available in the GitHub runner image at `$ANDROID_NDK_HOME`. This change improves the run time of the Android test jobs because it no longer has to install an NDK. * Update the lldb test's `--compiler` to reference the architecture-specific/android-version-specific `clang` location. This is done for correctness and should have no real impact on compilation of the tests. * Because we now use the pre-installed NDK, we no longer have to free-up disk space at the start of the test run to make space for the NDK install. This change also improves the run time of the Android test jobs. * Update the upstream test exclusion list for Android x86_64 to skip the tests that fail running against llvm-server on Android x86_64. * Update the ds2 test exclusion list for Android x86_64 to skip the tests that fail running against ds2 on Android x86_64. Note that the updated list looks a little longer, but the new version contains only full test names (no partial matches like `TestLldbGdbServer`, `TestGdbRemote`, etc) so it is excluding fewer tests than before. ## Validation Multiple CI runs on the PR request and private fork.
1 parent 6eb8c56 commit a825114

File tree

3 files changed

+118
-111
lines changed

3 files changed

+118
-111
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_call:
99

1010
env:
11-
LLVM_REF: ca102b2114fa8a00096d71ff9fc3b1b218f0f01a
11+
LLVM_REF: ec450b19004a653f3db3ad50e88fbf6529a9d841
1212
SCCACHE_DIRECT: yes
1313

1414
jobs:
@@ -444,45 +444,6 @@ jobs:
444444
name: Android ${{ matrix.processor }} test ${{ matrix.test-category}}
445445

446446
steps:
447-
# Free up some disk space by removing some things we don't use. Without
448-
# this step, we exhaust disk space while installing Android the emulator
449-
# image in the setup-ndk step below. The list of packages sorted by on
450-
# disk size can be generated by running the command:
451-
#
452-
# dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
453-
#
454-
- name: free-up disk space
455-
run: |
456-
df -h /home
457-
sudo apt purge -q aspnetcore-* \
458-
azure-* \
459-
containerd.io \
460-
containernetworking-plugins \
461-
docker-ce* \
462-
dotnet-* \
463-
firefox \
464-
gfortran-* \
465-
google-chrome-stable \
466-
google-cloud-cli* \
467-
kubectl \
468-
linux-azure-* \
469-
linux-modules-*-azure \
470-
microsoft-edge-stable \
471-
mono-* \
472-
monodoc-* \
473-
msbuild \
474-
mysql-* \
475-
podman \
476-
postgresql-* \
477-
powershell \
478-
r-base-core \
479-
vim-runtime
480-
sudo apt autoremove
481-
sudo rm -rf /usr/local/share/powershell
482-
sudo rm -rf /var/lib/docker
483-
sudo rm -rf /usr/share/swift
484-
df -h /home
485-
486447
- uses: actions/download-artifact@v4
487448
with:
488449
name: llvm-${{ runner.os }}-${{ runner.arch }}
@@ -511,16 +472,6 @@ jobs:
511472
with:
512473
path: ${{ github.workspace }}/SourceCache/ds2
513474

514-
- uses: nttld/setup-ndk@v1
515-
id: setup-ndk
516-
with:
517-
# NOTE: because of structural changes and the remvoal of gcc, Android
518-
# NDK r21e is the last NDK version that the lldb API tests can build
519-
# test binaries against. The lldb test framework will need to be
520-
# modified to run with a more recent NDK.
521-
ndk-version: r21e
522-
local-cache: true
523-
524475
# Cache the contents of $HOME/.android which contains emulators,
525476
# snapshots, and adb state.
526477
- name: Setup AVD cache
@@ -576,7 +527,7 @@ jobs:
576527
--platform-name remote-android
577528
--platform-url connect://localhost:5432
578529
--platform-working-dir /data/local/tmp
579-
--compiler=${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
530+
--compiler=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.processor }}-linux-android${{ matrix.api-level }}-clang
580531
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/android-${{ matrix.processor }}.excluded
581532
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/android-${{ matrix.processor }}.excluded
582533
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded

Support/Testing/Excluded/ds2/android-x86_64.excluded

Lines changed: 74 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,99 @@
11
skip
2-
lldbsuite.test.lldbtest.TestPrintf.test_dwarf
3-
lldbsuite.test.lldbtest.TestPrintf.test_dwo
4-
TestAttachDenied.AttachDeniedTestCase.test_attach_to_process_by_id_denied
52
TestBadAddressBreakpoints.BadAddressBreakpointTestCase.test_bad_address_breakpoints
3+
TestBreakpointSerialization.BreakpointSerialization.test_scripted_extra_args
64
TestBreakpointSetRestart.BreakpointSetRestart.test_breakpoint_set_restart_dwarf
75
TestBreakpointSetRestart.BreakpointSetRestart.test_breakpoint_set_restart_dwo
86
TestChangeProcessGroup.ChangeProcessGroupTestCase.test_setpgid
9-
TestConcurrentVFork.TestConcurrentVFork.test_follow_child_fork_call_exec
10-
TestConcurrentVFork.TestConcurrentVFork.test_follow_child_fork_no_exec
11-
TestConcurrentVFork.TestConcurrentVFork.test_follow_child_vfork_call_exec
12-
TestConcurrentVFork.TestConcurrentVFork.test_follow_child_vfork_no_exec
13-
TestContainerCommands.TestCmdContainer.test_container_add
7+
TestChangeValueAPI.ChangeValueAPITestCase.test_change_value_dwarf
8+
TestCommandScript.CmdPythonTestCase.test
9+
TestConcurrentTwoWatchpointsOneBreakpoint.ConcurrentTwoWatchpointsOneBreakpoint.test
10+
TestConcurrentSignalNWatchNBreak.ConcurrentSignalNWatchNBreak.test
1411
TestCreateAfterAttach.CreateAfterAttachTestCase.test_create_after_attach_dwarf
1512
TestCreateAfterAttach.CreateAfterAttachTestCase.test_create_after_attach_dwo
1613
TestDataFormatterCaching.TestDataFormatterCaching.test_with_run_command_dwarf
1714
TestDataFormatterCaching.TestDataFormatterCaching.test_with_run_command_dwo
18-
TestDataFormatterSynthType.DataFormatterSynthTypeTestCase.test_with_run_command_dwarf
19-
TestDataFormatterSynthType.DataFormatterSynthTypeTestCase.test_with_run_command_dwo
20-
TestDeletedExecutable.TestDeletedExecutable.test
15+
TestDataFormatterSynthVal.DataFormatterSynthValueTestCase.test_with_run_command_dwarf
16+
TestDataFormatterSynthVal.DataFormatterSynthValueTestCase.test_with_run_command_dwo
2117
TestExec.ExecTestCase.test_correct_thread_plan_state_before_exec
2218
TestExec.ExecTestCase.test_hitting_exec
2319
TestExec.ExecTestCase.test_skipping_exec
20+
TestExprDoesntBlock.ExprDoesntDeadlockTestCase.test_with_run_command_dwarf
2421
TestExpressionInSyscall.ExprSyscallTestCase.test_setpgid_dwarf
2522
TestExpressionInSyscall.ExprSyscallTestCase.test_setpgid_dwo
23+
TestFindInMemory.FindInMemoryTestCase.test_find_in_memory_ok
24+
TestFindRangesInMemory.FindRangesInMemoryTestCase.test_find_ranges_in_memory_one_match
25+
TestFindRangesInMemory.FindRangesInMemoryTestCase.test_find_ranges_in_memory_one_match_multiple_ranges
2626
TestFrames.FrameAPITestCase.test_get_arg_vals_for_call_stack_dwarf
2727
TestFrames.FrameAPITestCase.test_get_arg_vals_for_call_stack_dwo
28-
TestGdbRemote
28+
TestGdbRemoteAttachWait.TestGdbRemoteAttachWait.test_attach_with_vAttachWait_llgs
29+
TestGdbRemoteAttachWait.TestGdbRemoteAttachWait.test_launch_after_attach_with_vAttachOrWait_llgs
30+
TestGdbRemoteAttachWait.TestGdbRemoteAttachWait.test_launch_before_attach_with_vAttachOrWait_llgs
31+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_c_interspersed_nonstop_llgs
32+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_detach_all_nonstop_llgs
33+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_fork_follow_nonstop_llgs
34+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_fork_nonstop_llgs
35+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_kill_all_nonstop_llgs
36+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_vCont_interspersed_nonstop_llgs
37+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_vfork_follow_nonstop_llgs
38+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_vfork_nonstop_llgs
39+
TestGdbRemoteForkNonStop.TestGdbRemoteForkNonStop.test_vkill_both_nonstop_llgs
40+
TestGdbRemoteFork.TestGdbRemoteFork.test_c_child_llgs
41+
TestGdbRemoteFork.TestGdbRemoteFork.test_c_child_then_parent_llgs
42+
TestGdbRemoteFork.TestGdbRemoteFork.test_c_interspersed_llgs
43+
TestGdbRemoteFork.TestGdbRemoteFork.test_c_parent_llgs
44+
TestGdbRemoteFork.TestGdbRemoteFork.test_c_parent_then_child_llgs
45+
TestGdbRemoteFork.TestGdbRemoteFork.test_detach_all_llgs
46+
TestGdbRemoteFork.TestGdbRemoteFork.test_detach_current_llgs
47+
TestGdbRemoteFork.TestGdbRemoteFork.test_fork_follow_llgs
48+
TestGdbRemoteFork.TestGdbRemoteFork.test_fork_llgs
49+
TestGdbRemoteFork.TestGdbRemoteFork.test_fork_multithreaded_llgs
50+
TestGdbRemoteFork.TestGdbRemoteFork.test_kill_all_llgs
51+
TestGdbRemoteFork.TestGdbRemoteFork.test_memory_read_write_llgs
52+
TestGdbRemoteFork.TestGdbRemoteFork.test_qC_llgs
53+
TestGdbRemoteFork.TestGdbRemoteFork.test_register_read_write_llgs
54+
TestGdbRemoteFork.TestGdbRemoteFork.test_select_wrong_pid_llgs
55+
TestGdbRemoteFork.TestGdbRemoteFork.test_threadinfo_llgs
56+
TestGdbRemoteFork.TestGdbRemoteFork.test_T_llgs
57+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_all_processes_explicit_llgs
58+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_all_processes_implicit_llgs
59+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_child_llgs
60+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_child_then_parent_llgs
61+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_interspersed_llgs
62+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_parent_llgs
63+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_parent_then_child_llgs
64+
TestGdbRemoteFork.TestGdbRemoteFork.test_vCont_two_processes_llgs
65+
TestGdbRemoteFork.TestGdbRemoteFork.test_vfork_follow_llgs
66+
TestGdbRemoteFork.TestGdbRemoteFork.test_vfork_llgs
67+
TestGdbRemoteFork.TestGdbRemoteFork.test_vkill_both_llgs
68+
TestGdbRemoteFork.TestGdbRemoteFork.test_vkill_child_llgs
69+
TestGdbRemoteFork.TestGdbRemoteFork.test_vkill_parent_llgs
70+
TestGdbRemoteGPacket.TestGdbRemoteGPacket.test_g_returns_correct_data_no_suffix_llgs
71+
TestGdbRemoteGPacket.TestGdbRemoteGPacket.test_g_returns_correct_data_with_suffix_llgs
72+
TestGdbRemoteMemoryAllocation.TestGdbRemoteMemoryAllocation.test_bad_packet_llgs
73+
TestGdbRemoteMemoryAllocation.TestGdbRemoteMemoryAllocation.test_supported_llgs
74+
TestGdbRemoteModuleInfo.TestGdbRemoteModuleInfo.test_module_info_llgs
75+
TestGdbRemoteTargetXmlPacket.TestGdbRemoteTargetXmlPacket.test_g_target_xml_returns_correct_data_llgs
76+
TestGdbRemoteThreadsInStopReply.TestGdbRemoteThreadsInStopReply.test_stop_reply_contains_thread_pcs_llgs
2977
TestHelloWorld.HelloWorldTestCase.test_with_attach_to_process_with_id_api
3078
TestHelloWorld.HelloWorldTestCase.test_with_attach_to_process_with_name_api
3179
TestInferiorCrashing.CrashingInferiorTestCase.test_inferior_crashing_dwarf
3280
TestInferiorCrashing.CrashingInferiorTestCase.test_inferior_crashing_dwo
33-
TestLldbGdbServer
81+
TestLldbGdbServer.LldbGdbServerTestCase.test_Hc_then_Csignal_signals_correct_thread_launch_llgs
82+
TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_fails_on_another_pid_llgs
83+
TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_fails_on_minus_one_pid_llgs
84+
TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_fails_on_zero_pid_llgs
85+
TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_switches_to_3_threads_launch_llgs
86+
TestLldbGdbServer.LldbGdbServerTestCase.test_qRegisterInfo_contains_avx_registers_llgs
87+
TestLldbGdbServer.LldbGdbServerTestCase.test_qSupported_fork_events_llgs
88+
TestLldbGdbServer.LldbGdbServerTestCase.test_qSupported_siginfo_read_llgs
89+
TestLldbGdbServer.LldbGdbServerTestCase.test_qSupported_vfork_events_llgs
90+
TestLldbGdbServer.LldbGdbServerTestCase.test_qXfer_siginfo_read_llgs
3491
TestLoadUnload.LoadUnloadTestCase.test_lldb_process_load_and_unload_commands
3592
TestLoadUnload.LoadUnloadTestCase.test_lldb_process_load_and_unload_commands_with_svr4
3693
TestLoadUnload.LoadUnloadTestCase.test_static_init_during_load
94+
TestMachCore.MachCoreTestCase.test_selected_thread
3795
TestMainThreadExit.ThreadExitTestCase.test
96+
TestMemoryHistory.AsanTestCase.test_dwo
3897
TestNonStop.LldbGdbServerTestCase.test_exit_llgs
3998
TestNonStop.LldbGdbServerTestCase.test_exit_query_llgs
4099
TestNonStop.LldbGdbServerTestCase.test_leave_nonstop_llgs
@@ -49,18 +108,11 @@ TestNonStop.LldbGdbServerTestCase.test_vCont_then_partial_stop_llgs
49108
TestNonStop.LldbGdbServerTestCase.test_vCont_then_partial_stop_run_both_llgs
50109
TestNonStop.LldbGdbServerTestCase.test_vCont_then_stop_llgs
51110
TestNonStop.LldbGdbServerTestCase.test_vCtrlC_llgs
52-
TestPartialResume.TestPartialResume.test_vCont_cxcx_llgs
53-
TestPartialResume.TestPartialResume.test_vCont_cxcxt_llgs
54-
TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_id
55-
TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_id_autocontinue
56111
TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_id_correct_executable_offset
57112
TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_name
58-
TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_from_different_dir_by_id
59113
TestRegistersIterator.RegistersIteratorTestCase.test_iter_registers_dwarf
60114
TestRegistersIterator.RegistersIteratorTestCase.test_iter_registers_dwo
61-
TestRegisters.RegisterCommandsTestCase.test_convenience_registers_16bit_with_process_attach
62-
TestRegisters.RegisterCommandsTestCase.test_convenience_registers_with_process_attach
63-
TestRegisters.RegisterCommandsTestCase.test_process_must_be_stopped
115+
TestReportData.AsanTestReportDataCase.test_dwo
64116
TestReturnValue.ReturnValueTestCase.test_for_cpp_support_dwarf
65117
TestReturnValue.ReturnValueTestCase.test_for_cpp_support_dwo
66118
TestReturnValue.ReturnValueTestCase.test_vector_values_dwarf
@@ -71,14 +123,7 @@ TestSendSignal.SendSignalTestCase.test_with_run_command_dwarf
71123
TestSendSignal.SendSignalTestCase.test_with_run_command_dwo
72124
TestSettings.SettingsCommandTestCase.test_launchsimple_args_and_env_vars
73125
TestSettings.SettingsCommandTestCase.test_run_args_and_env_vars
74-
TestSignal.TestSignal.test_signal_all_threads_by_pid_llgs
75-
TestSignal.TestSignal.test_signal_all_threads_llgs
76-
TestSignal.TestSignal.test_signal_minus_one_by_minus_one_llgs
77-
TestSignal.TestSignal.test_signal_minus_one_by_pid_llgs
78-
TestSignal.TestSignal.test_signal_minus_one_llgs
79-
TestSignal.TestSignal.test_signal_process_by_pid_llgs
80-
TestSignal.TestSignal.test_signal_process_minus_one_llgs
81-
TestSignal.TestSignal.test_signal_process_without_tid_llgs
126+
TestSingleThreadStepTimeout.SingleThreadStepTimeoutTestCase.test_step_over_multi_calls_small_timeout_fast_stepping
82127
TestStateAfterExpression.TestStopReasonAfterExpression.test_thread_state_after_expr_dwarf
83128
TestStateAfterExpression.TestStopReasonAfterExpression.test_thread_state_after_expr_dwo
84129
TestSyntheticCapping.SyntheticCappingTestCase.test_with_run_command_dwo
@@ -87,7 +132,6 @@ TestTargetCreateDeps.TargetDependentsTestCase.test_dependents_explicit_false_exe
87132
TestTargetCreateDeps.TargetDependentsTestCase.test_dependents_explicit_false_lib
88133
TestTargetCreateDeps.TargetDependentsTestCase.test_dependents_implicit_default_exe
89134
TestTargetCreateDeps.TargetDependentsTestCase.test_dependents_implicit_default_lib
90-
TestThreadSelectionBug.TestThreadSelectionBug.test
91135
TestUnalignedLargeWatchpoint.UnalignedLargeWatchpointTestCase.test_unaligned_large_watchpoint
92136
TestUnwindExpression.UnwindFromExpressionTest.test_unwind_expression_dwarf
93137
TestUnwindExpression.UnwindFromExpressionTest.test_unwind_expression_dwo

0 commit comments

Comments
 (0)