On Wed, Mar 25, 2020 at 9:10 AM Pavel Labath <pav...@centrum.sk> wrote:
> On 25/03/2020 01:04, Adrian McCarthy wrote: > > I took a stab at this, but I'm not seeing any new test failures. > > That is odd. > > I was doing some stuff on windows today, so I figured I'd take a stab at > this. I was kind of right that the check in ProcessLauncher windows > prevents us from passing an empty environment. > > However, the interesting part starts when I tried to remove that check. > Then the test started behaving nondeterministically -- sometimes passing > and sometimes failing due to ERROR_INVALID_PARAMETER being returned from > CreateProcessW. I can see how windows might need some environment > variables to start up a process correctly, but I do not understand why > this should be nondeterministic... > Oh, I have a guess. CreateProcessW takes a pointer to an environment block. If that pointer is null, the process will inherit the parent environment. If you want to pass it an empty environment, you have to have a valid pointer to an empty string (or possibly to a string with TWO terminating '\0's). > This is beyond my knowledge of windows. It might be interesting to > reduce this to a simple test case (independent of lldb) and show it to > some windows expert. > > I am attaching a patch with the lldb changes I've made, in case you want > to play around with it. > > > I assume > > the problem you're seeing is in TestSettings.py, but I've never figured > > out how to run individual Python-based lldb tests since all the > > dotest.py stuff was re-written. > > These days we have multiple ways of achieving that. :) > > One way would be via the "check-lldb-api-commands-settings" target which > would run all tests under api/commands/settings (i.e. TestSettings.py > and TestQuoting.py). > > Another option would be via the lldb-dotest script. > "python bin\lldb-dotest -p TestSettings.py" would just run that single > file. That script passes all of its options to dotest, so you can use > any of the dotest options that you used to use. > I would be thrilled if either of those worked for me. Somehow, check-lldb works, but the check-lldb-... doesn't. The lldb-dotest solution always fails for me because I can't figure out WTF it wants for PYTHONHOME and PYTHONPATH. > > pl >
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits