summaryrefslogtreecommitdiff
path: root/cross-project-tests
Commit message (Collapse)AuthorAgeFilesLines
* [Dexter] Add timeout optionsStephen Tozer2023-03-224-6/+82
| | | | | | | | | | | | | | Adds a pair of options for Dexter that allow the user to specify a timeout duration. These options are: * --timeout-total: Times out if the total run-time of the debugger session exceeds <timeout-total> seconds. * --timeout-breakpoint: Times out if the time without hitting a breakpoint exceeds <timeout-breakpoint> seconds. Reviewed By: Orlando Differential Revision: https://reviews.llvm.org/D145063
* [Dexter] Add a simple logging class to DexterStephen Tozer2023-03-159-32/+71
| | | | | | | | | | | | Adds a basic logging class to Dexter that uses the existing PrettyOutput class for printing and supports 3 levels of verbosity (note, warning, error). Intended to consolidate the logging logic for Dexter into one place, removing the need for conditional log statements and making it easier for us later if we wish to use a more complete logging class. Reviewed By: Orlando Differential Revision: https://reviews.llvm.org/D144983
* [Dexter] Add target_run_args optionStephen Tozer2023-03-156-1/+45
| | | | | | | | Adds an option to Dexter that passes command line arguments to the debugged process, following (and in addition to) any arguments given by the DexCommandLine command. Differential Revision: https://reviews.llvm.org/D144979
* [Dexter] Use non-blocking resume when debugging Visual StudioStephen Tozer2023-03-011-3/+3
| | | | | | | | | | | The Visual Studio debugger currently uses blocking calls to Go and StepInto, which interferes with Dexter's ability to do any processing (e.g. checking for time outs) in between breakpoints. This patch updates these functions to use non-blocking calls. Reviewed By: Orlando Differential Revision: https://reviews.llvm.org/D144986
* [AMDGPU] Add cross-project-tests for WMMA builtinsDiana Picus2023-02-175-1/+151
| | | | | | | | Add a few tests to make sure we get the expected instruction for the WMMA builtins (and generally that our builtins and intrinsics are on the same page and won't blow up). Differential Revision: https://reviews.llvm.org/D144176
* Walk back an overly-aggressive unXFAIL.Adrian Prantl2023-02-031-0/+1
|
* UnXFAIL test.Adrian Prantl2023-02-031-3/+0
|
* Upgrade llgdb script for Python 3 compatibility.Adrian Prantl2023-02-031-47/+33
|
* Update llgdb to use python3.Adrian Prantl2023-02-031-2/+1
|
* [Dexter] Add on_line parameter to DexExpectStepOrder commandBen Mudd2023-01-195-9/+29
| | | | | | | | | | | DexExpectStepOrder uses the line to expect a debugger step from the actual line of the command in the Dexter source file. Now Dexter scripts have mainly moved to thier own script files instead of the actual source, there should be a option to override this behaviour to choose your own debugger step location. Reviewed By: Orlando Differential Revision: https://reviews.llvm.org/D142099
* [cross-project-tests] Use std::optional instead of llvm::Optional (NFC)Kazu Hirata2023-01-141-3/+2
| | | | | | | This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
* [llgdb-tests] Convert test to check 'target=...'Paul Robinson2023-01-041-1/+1
| | | | | Part of the project to eliminate special handling for triples in lit expressions.
* [cross-project-tests] Use std::nullopt instead of llvm::None (NFC)Kazu Hirata2022-12-101-1/+2
| | | | | | | This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
* [dexter-tests] Add attribute optnone to main functionGuozhi Wei2022-10-261-0/+1
| | | | | | | | | | | The test case optnone-simple-functions.cpp is expected to be compiled unoptimized even under -O2 because of attribute optnone. But this attribute is missed for main function, and caused the fail in https://lab.llvm.org/buildbot/#/builders/217/builds/14046 when it triggered optimizations. This patch fixes that by adding attribute optnone to main function. Differential Revision: https://reviews.llvm.org/D136778
* [dexter] Temporary disable optnone-simple-functionsJonas Devlieghere2022-10-261-1/+1
| | | | | | | D136396 broke optnone-simple-functions. Temporary disabling the test to unblock the bot until the Sony folks can have a look. https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/47878/
* [Dexter] Ignore step information in __libc_start_call_mainOCHyams2022-10-121-1/+1
| | | | | | | | | | | The test dexter/feature_tests/commands/perfect/expect_step_kind/direction.cpp was failing on a machine because __libc_start_call_main was not identified as a "frame below main" (a frame we don't want to gather information from), causing dexter to count one more step than expected in the test. Add __libc_start_call_main to the list of "frames below main". There may be a more robust way of doing this but this is a pragmatic solution we can use for now.
* [Pipelines] Introduce DAE after ArgumentPromotionPavel Samolysov2022-09-221-2/+4
| | | | | | | | | | | | The ArgumentPromotion pass uses Mem2Reg promotion at the end to cutting down generated `alloca` instructions as well as meaningless `store`s and this behavior can leave unused (dead) arguments. To eliminate the dead arguments and therefore let the DeadCodeElimination remove becoming dead inserted `GEP`s as well as `load`s and `cast`s in the callers, the DeadArgumentElimination pass should be run after the ArgumentPromotion one. Differential Revision: https://reviews.llvm.org/D128830
* Revert "[debuginfo-tests] Un-XFAIL no passing unused-merged-value.c test"Adrian Prantl2022-09-021-4/+2
| | | | This reverts commit 96f00f63b2d65ebe759ae1746c30115e73cbd4f2 because D128830 has been reverted.
* [debuginfo-tests] Un-XFAIL no passing unused-merged-value.c testMichael Buch2022-08-251-2/+4
| | | | | | | | | | | | | This test would previously expect one of the parameters to have an incorrect DW_AT_location. Stepping through `fun` with a debugger would then no reflect updates to one of the parameters. With a recent change to Clang's DeadArgumentEliminationPass (see `879f5118fc74657e4a5c4eff6810098e1eed75ac`) the generated DWARF does not contain a location for `parama`, and stepping through the function with `lldb` works as expected. Differential Revision: https://reviews.llvm.org/D132664
* [cross-project] Disable debug-types-section tests on Apple systemsFelipe de Azevedo Piovezan2022-08-243-1/+3
| | | | | | | | The -fdebug-types-section flag is not supported on Apple platforms. Reviewed By: Michael137 Differential Revision: https://reviews.llvm.org/D132410
* [Clang] Diagnose ill-formed constant expression when setting a non fixed ↵Shafik Yaghmour2022-07-281-2/+2
| | | | | | | | | | | enum to a value outside the range of the enumeration values DR2338 clarified that it was undefined behavior to set the value outside the range of the enumerations values for an enum without a fixed underlying type. We should diagnose this with a constant expression context. Differential Revision: https://reviews.llvm.org/D130058
* [cross-project-tests] Add split-file as dependencyArthur Eubanks2022-07-271-1/+2
| | | | | | | | simplified_template_names_noncanonical_type_units.cpp uses split-file. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D130656
* Pretty printer test fixesDavid Blaikie2022-07-121-5/+5
|
* Add missing include for std::size_tDavid Blaikie2022-07-121-0/+1
|
* Revert "Rebase: [Facebook] Add clang driver options to test debug info and BOLT"spupyrev2022-07-112-17/+1
| | | | This reverts commit f921985a29fc9787b3ed98dbc897146cc3fd91f7.
* Rebase: [Facebook] Add clang driver options to test debug info and BOLTAmir Ayupov2022-07-112-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is an essential piece of infrastructure for us to be continuously testing debug info with BOLT. We can't only make changes to a test repo because we need to change debuginfo tests to call BOLT, hence, this diff needs to sit in our opensource repo. But when upstreaming to LLVM, this should be kept BOLT-only outside of LLVM. When upstreaming, we need to git diff and check all folders that are being modified by our commits and discard this one (and leave as an internal diff). To test BOLT in debuginfo tests, configure it with -DLLVM_TEST_BOLT=ON. Then run check-lldb and check-debuginfo. Manual rebase conflict history: https://phabricator.intern.facebook.com/D29205224 https://phabricator.intern.facebook.com/D29564078 https://phabricator.intern.facebook.com/D33289118 https://phabricator.intern.facebook.com/D34957174 Test Plan: tested locally Configured with: -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;compiler-rt;bolt;debuginfo-tests" -DLLVM_TEST_BOLT=ON Ran test suite with: ninja check-debuginfo ninja check-lldb Reviewers: #llvm-bolt Subscribers: ayermolo, phabricatorlinter Differential Revision: https://phabricator.intern.facebook.com/D35317341 Tasks: T92898286
* [Dexter] Remove debugger-dependent test from windowsStephen Tozer2022-06-131-1/+3
| | | | | | | One of the tests added in the recent floating point patch involves string comparison against the debugger output; as DbgEng and LLDB have different output, the test cannot pass against both of them, so disable it on windows.
* [Dexter] Fix incorrect test expectations for floating point testsStephen Tozer2022-06-132-2/+2
| | | | | A pair of tests had incorrect expectations set, one being an off-by-one error and the other using decimal points in the expect that lldb omits.
* [Dexter] Allow Dexter watch commands to specify a range of acceptable FP valuesStephen Tozer2022-06-1310-10/+159
| | | | | | | | | This patch adds an optional argument to DexExpectWatchBase, float_range, which defines a +- acceptance range for expected floating point values. If passed, this assumes every expected value to be a floating point value, and an exception will be thrown if this is not the case. Differential Revision: https://reviews.llvm.org/D124511
* [Dexter] Use PurePath to compare paths in Dexter commandsStephen Tozer2022-06-083-7/+8
| | | | | | | | | | | Prior to this patch, when comparing the paths of source files in Dexter commands, we would use os.samefile. This function performs actual file operations and requires the files to exist on the current system; this is suitable when running the test for the first time, but renders the DextIR output files non-portable, and unusable if the source files no longer exist in their original location. Differential Revision: https://reviews.llvm.org/D127099
* [Dexter] Catch value error when encountering invalid addressStephen Tozer2022-06-081-4/+6
| | | | | | | | | | | The DexDeclareAddress command checks the value of a variable at a certain point in the debugged program, and saves that value to be used in other commands. If the value at that point is not a valid address however, it currently causes an error in Dexter when we try to cast it - this is fixed in this patch by catching the error and leaving the address value unresolved. Differential Revision: https://reviews.llvm.org/D127101
* [lit] Fix setup of sanitizer environmentVitaly Buka2022-05-191-5/+0
| | | | | | | | Not all options were propageted into tests. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D122869
* Speculatively fix build botsAaron Ballman2022-04-201-0/+1
| | | | | | | | This should address build failures found in: https://lab.llvm.org/buildbot/#/builders/217/builds/3610 https://lab.llvm.org/buildbot/#/builders/215/builds/4609 https://lab.llvm.org/buildbot/#/builders/68/builds/31012
* [Dexter] Collate penalties of the same type into a single line for eachStephen Tozer2022-04-112-5/+43
| | | | | | | | | | | | Currently in Dexter, every step at which a DexExpectWatchValue/Type does not have the correct value is printed on a separate line. This patch reduces the size of the text output by instead printing each incorrect result (i.e. each incorrect value seen, 'Variable optimized out', and so on) on its own line, alongside a list of the steps at which that result was seen. This makes for much less spam in the output when watches are missing or wrong for many steps. Differential Revision: https://reviews.llvm.org/D120716
* DebugInfo: Consider the type of NTTP when simplifying template namesDavid Blaikie2022-04-081-0/+5
| | | | | | Since the NTTP may need to be cast to the type when rebuilding the name, check that the type can be rebuilt when determining whether a template name can be simplified.
* DebugInfo: Don't allow type units to references types in the CUDavid Blaikie2022-03-251-0/+18
| | | | | | | | | | | | | | | | We could only do this in limited ways (since we emit the TUs first, we can't use ref_addr (& we can't use that in Split DWARF either) - so we had to synthesize declarations into the TUs) and they were ambiguous in some cases (if the CU type had internal linkage, parsing the TU would require knowing which CU was referencing the TU to know which type the declaration was for, which seems not-ideal). So to avoid all that, let's just not reference types defined in the CU from TUs - instead moving the TU type into the CU (recursively). This does increase debug info size (by pulling more things out of type units, into the compile unit) - about 2% of uncompressed dwp file size for clang -O0 -g -gsplit-dwarf. (5% .debug_info.dwo section size increase in the .dwp)
* DebugInfo: Classify noreturn function types as non-reconstructibleDavid Blaikie2022-03-241-0/+2
| | | | | | | | | This information isn't preserved in the DWARF description of function types (though probably should be - it's preserved on the function declarations/definitions themselves through the DW_AT_noreturn attribute - but we should move or also include that in the subroutine type itself too - but for now, with it not being there, the DWARF is lossy and can't be reconstructed)
* llvm-dwarfdump: Including calling convention attribute in pretty printed ↵David Blaikie2022-03-221-0/+2
| | | | type names
* [WebAssembly] Add end-to-end codegen tests for wasm_simd128.hThomas Lively2022-03-175-2/+1287
| | | | | | | | | | | | | | | | | Add a test checking that each SIMD intrinsic produces the expected instruction. Since this test spans both clang and LLVM, place it in a new intrinsic-header-tests subdirectory of cross-project-tests. This revives D101684 now that cross-project-tests exists. In practice, the tests of lowering from wasm_simd128.h to LLVM IR were not as useful as this end-to-end test. Updates the version check of gdb in cross-project-tests/lit.cfg.py so that unexpected version formats do not prevent the new tests from running. Depends on D121661. Differential Revision: https://reviews.llvm.org/D121662
* Use lit_config.substitute instead of foo % lit_config.params everywhereSam McCall2022-03-161-12/+2
| | | | | | This mechanically applies the same changes from D121427 everywhere. Differential Revision: https://reviews.llvm.org/D121746
* [CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLEPetr Hosek2022-03-111-1/+1
| | | | | | | This clarifies that this is an LLVM specific variable and avoids potential conflicts with other projects. Differential Revision: https://reviews.llvm.org/D119918
* [Dexter] Optimize breakpoint deletion in Visual Studiogbtozers2022-03-015-30/+40
| | | | | | | | | | | | | | | | | | | | Breakpoint deletion in visual studio is currently implemented by iterating over the breakpoints we want to delete, for each of which we iterate over the complete set of breakpoints in the debugger instance until we find the one we wish to delete. Ideally we would resolve this by directly deleting each breakpoint by some ID rather than searching through the full breakpoint list for them, but in the absence of such a feature in VS we can instead invert the loop to improve performance. This patch changes breakpoint deletion to iterate over the complete list of breakpoints, deleting breakpoints that match the breakpoints we expect to delete by checking set membership. This represents a worst-case improvement from O(nm) to O(n), for 'm' breakpoints being deleted out of 'n' total. In practise this is almost exactly 'm'-times faster, as when we delete multiple breakpoints they are typically adjacent in the full breakpoint list. Differential Revision: https://reviews.llvm.org/D120658
* DebugInfo: fix a couple of spurious spaces in simplified template name ↵David Blaikie2022-02-161-0/+2
| | | | rebuilding
* DebugInfo: Disable simplified template names for -gmlt and belowDavid Blaikie2022-02-151-0/+3
| | | | | Since -gmlt doesn't carry any type information necessary to rebuild template names.
* DebugInfo: Don't simplify template names using _BitInt(N)David Blaikie2022-02-151-0/+2
| | | | | _BitInt(N) only encodes the byte size in DWARF, not the bit size, so can't be reconstituted.
* [dexter] Don't generate results files by defaultOCHyams2022-02-115-60/+93
| | | | | | | | | | | | Dexter saves various files to a new results directory each time it is run (including when it's run by lit tests) and there isn't a way to opt-out. This patch reconfigures the behaviour to be opt-in by removing the default `--results-directory` location. Now results are only saved if `--results-directory` is specified. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D119545
* DebugInfo: Don't simplify names referencing local enumsDavid Blaikie2022-02-101-0/+11
| | | | | | | | | | | | | | | Due to the way type units work, this would lead to a declaration in a type unit of a local type in a CU - which is ambiguous. Rather than trying to resolve that relative to the CU that references the type unit, let's just not try to simplify these names. Longer term this should be fixed by not putting the template instantiation in a type unit to begin with - since it references an internal linkage type, it can't legitimately be duplicated/in more than one translation unit, so skip the type unit overhead. (but the right fix for that is to move type unit management into a DICompositeType flag (dropping the "identifier" field is not a perfect solution since it breaks LLVM IR linking decl/def merging during IR linking))
* DebugInfo: Don't simplify any template referencing a lambdaDavid Blaikie2022-02-102-0/+41
| | | | | | | | | | | | | | Lambda names aren't entirely canonical (as demonstrated by the cross-project-test added here) at the moment (we should fix that for a bunch of reasons) - even if the template referencing them is non-simplified, other names referencing /that/ template can't be simplified either because type units might cause a different template to be picked up that would conflict with the expected name. (other than for roundtripping precision, it'd be OK to simplify types that reference types that reference lambdas - but best be consistent between the roundtrip/verify mode and the actual simplified template names mode)
* [cross-project-tests] REQUIRES: system-darwin in llgdb-tests/asan-deque.cppOCHyams2022-02-101-4/+4
| | | | | | Some configurations of gdb pretty print std::deque and some don't. Make this test run only on system-darwin (which uses lldb instead), otherwise it will fail on some non-darwin machines and not others.
* [cross-project-tests] Add REQUIRES: compiler-rt to tests that use asanOCHyams2022-02-108-12/+16
| | | | | | | | | And XFAIL debuginfo-tests/llgdb-tests/asan-deque.cpp on !system-darwin. On non-darwin systems these tests use gdb and this one fails because gdb doesn't pretty-print std::deque (the elements of the deque are not printed so the CHECK lines fail). Differential Revision: https://reviews.llvm.org/D118760