-
Notifications
You must be signed in to change notification settings - Fork 21
spin lldb -- python -mspin test
doesn't work anymore
#255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@seberg Could you give me an example of what you'd like to see happen here? |
The way spin spawns the actual spawns the test process, lldb doesn't wrap it. Not sure if there is a clear solution though (maybe I need to tell lldb to wrap the child process or just launch the tests more explicitly). Basically, add a test like:
which segfaults. If you just run it with Maybe there is a very simple work-around. I think last time I around I made a minimal example and used |
I looked into this a bit, but I don't know lldb well enough to proceed. I tried With the first option I get the traceback, but trying something like Are you able to help me explore the solutions here? |
Happy to poke this a bit, but not sure what to actually try. I can't find a good hint on how one might tell One thing to help if you poke more might be running with:
That will disable the Python traceback from the faulthandler. But I don't recall it should change behavior, but better safe than sorry.
That was the solution I was hoping might work relatively easily. If it doesn't than maybe it just isn't to be (until someone more knowledgeable teaches us a new trick...). |
It's possible that some of those solutions work; it's hard for me to tell, since I don't know what "successful" behavior is. Do you have an example I can look at that does not involve spin, that shows how a traceback should present? |
Ah sorry, the "success" is that you get a segfault and can do a To see it, put the "test" into a file,
then run:
and of course then
And |
OTOH, I suppose there is a decent chance the bug is in |
We chatted about this on the NumPy triage meeting today and I shared that
For this to work, you need to pass the absolute path to the python intepreter, the pytest script, and the relative path to the Maybe spin could help make this less arcane in the UI? |
Ouch, yes, we certainly should! It would be easy enough to launch the correct
If it did, we could add, e.g., |
Nope, for whatever reason, that hits an error:
|
Right, so we'll need the same workaround we use for our regular test command to avoid importing from the wrong path. In this case, I wonder if perhaps we add a flag to the test command, so that we wrap lldb around it? |
It's very much a half-baked PR, but take a look and let's see if we can iterate on that until it's working: #281 |
Uh oh!
There was an error while loading. Please reload this page.
I think this used to work, but I suspect that
python -mspin test
now runs in a new process so that the debugger/lldb doesn't attach to you.I am not sure that this can be changed easily, FWIW,
python lldb -c ...
, etc. all work fine (I just like to run a test that fails if it does).EDIT: This is not new in 0.13, if it changed (I think it did), it changed a while ago.
The text was updated successfully, but these errors were encountered: