Commit Graph

12 Commits

Author SHA1 Message Date
Jeremy Morse 5ee4a03bc9 [debuginfo-tests][Dexter] Fix some Windows-unfriendly Dexter behaviours
These are some minor things that I've run into on Windows, largely in
error handling paths:

 * Giving --lldb-executable on Windows triggers a "useless option" code
   path, which touches an attribute that only exists in the
   list_debuggers tool. Switch this to use hasattr, which will work in
   all subtools.
 * We were over-decoding some text reporting errors, but only in an
   exception path
 * The path to lldb on Windows needs to be quoted (even though dexter
   isn't making use of it).

Differential Revision: https://reviews.llvm.org/D74546
2020-02-13 14:24:33 +00:00
Jeremy Morse 26f6aa9e3b [debuginfo-tests] Fix Dexter process creation failure on Windows
When writing the Windows dbgeng driver for Dexter, I couldn't work out why it
would either launch a process and leave it free running, or if I started the
process suspended, never do anything with it. The result was a hack to create
and attach processes manually. This has been flaking out on Reids Windows
buildbot, and clearly wasn't a good solution.

Digging into this, it turns out that the "normal" cdb / windbg behaviour of
breaking whenever we attach to a process is not the default: it has to be
explicitly requested from the debug engine. This patch does so (by setting
DEBUG_ENGOPT_INITIAL_BREAK in the engine options), after which we can simply
call "CreateProcessAndAttach2" and everything automagically works.

No test for this behaviour: everything was just broken before.

Differential Revision: https://reviews.llvm.org/D74409
2020-02-13 12:46:32 +00:00
Reid Kleckner 63f49465c3 [dexter] Fix feature tests on Windows
First, add LLD as a dependency on Windows. The windows batch scripts
pass -fuse-ld=lld, so they need it.

Second, decode builder stdout/stderr even if the command fails.
Otherwise it gets printed as b'line 1\n\rline 2\n\r'.

Last, make the batch script one line less noisy. We might want to try to
do more here, though. It would be nice if we could get as close to
possible as lit, where you can literally copy & paste the failing
command to re-run it.

With the two changes above, now the feature tests that use clang++.bat
pass for me. The clang-cl_vs2015 ones still fail, and I'll fix them
separately.

Reviewers: jmorse

Differential Revision: https://reviews.llvm.org/D69725
2019-11-05 10:49:57 -08:00
Reid Kleckner 7035ea6e3e [dexter] Remove lit check for python 3
This is checking the version of Python used to run lit, which is not
necessarily the same as the version used to run the dexter tests.  If
the tests are run via the build/bin/llvm-lit[.py] helper script, then
that is likely to pick up whatever version of Python is on PATH.
Conventionally, this will find Python 2. CMake already checks that
Python 3 is in use and puts the path to it in the lit site config, so
this check is redundant, and Python 3 will ultimately be used to run
dexter.

Reviewers: jmorse

Differential Revision: https://reviews.llvm.org/D69724
2019-11-05 10:49:56 -08:00
Jeremy Morse be79db93fb [Dexter] Continue sprinking no-location fixes
Example failure:

http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/3255/testReport/junit/debuginfo-tests/dexter-tests/asan_c/

The tests themselves seem to be working, it's just unexplored paths within
dexter that are flaking out.
2019-11-01 13:57:52 +00:00
Jeremy Morse 6e217ba3ea [Dexter] Account for another no-lineno scenario
This is another part of Dexter that had never seen a missing source
location before, now newly turning up on Darwin.
2019-11-01 13:41:56 +00:00
Jeremy Morse e34179aad1 [Dexter] Cope better with empty source locations
When running a program, Dexter single steps if it's in one of the source
files under test, or free-runs if it isn't. Handle the circumstance where
the current source file simply isn't known.
2019-11-01 13:30:26 +00:00
Jeremy Morse 7f738c811a Fix a brain-fail with debuginfo-tests/dexter internal tests
I baked the "test" subcommand into the %dexter substituion, as that's
what all of the dexter tests use. However I forgot about the internal
tests for whether dexters features are working. Install a %dexter_base
command to allow those tests to call dexter.py directly, and un-xfail
the tests on darwin.

Update too the list of paths the unittests shouldn't try and cover, as it
tries to load dbgeng on unix machines. Ideally we wouldn't be using this
method of test discovery in the future.
2019-11-01 12:35:38 +00:00
Adrian Prantl 8e40620441 XFAIL dexter tests on Darwin.
These fail parsing command line arguments.
2019-10-31 11:22:19 -07:00
Jeremy Morse 984fad243d Reapply "Import Dexter to debuginfo-tests""
This reverts commit cb935f3456.

Discussion in D68708 advises that green dragon is being briskly
refurbished, and it's good to have this patch up testing it.
2019-10-31 16:51:53 +00:00
Jeremy Morse cb935f3456 Revert "Import Dexter to debuginfo-tests"
This reverts commit f78c236efd.

Green dragon breakage was observed; I'll take a look at why.
2019-10-31 16:22:10 +00:00
Jeremy Morse f78c236efd Import Dexter to debuginfo-tests
Dexter (Debug Experience Tester) is a test-driver for our debug info
integration tests, reading a set of debug experience expectations and
comparing them with the actual behaviour of a program under a debugger.
More about Dexter can be found in the RFC:

  http://lists.llvm.org/pipermail/llvm-dev/2019-October/135773.html

and the phab review in D68708. Not all the debuginfo tests have been
transformed into Dexter tests, and we look forwards to doing that
incrementally.

This commit mostly aims to flush out buildbots that are running
debuginfo-tests but don't have python 3 installed, possibly
green-dragon and some windows bots.
2019-10-31 13:49:47 +00:00