This is an archive of the discontinued LLVM Phabricator instance.

[debuginfo-tests][Dexter] Downgrade failure to delete working dir to warning not error
ClosedPublic

Authored by jmorse on Feb 13 2020, 5:16 AM.

Details

Summary

On Windows, an error running the debugger typically leaves a process hanging around in the working directory. When Dexter exits, it can't then delete the working directory and produces an exception, masking the problem in the debugger. (This can be worked around by specifying --save-temps). Rather than hard-erroring, print a warning when we can't delete the working directory instead.

It'd be much better to improve our error handling, and make the WorkingDirectory class aware that something's wrong when it enters exit. However, this is something that's going to mask genuine errors and make everyones lives harder right now, so I think this non-ideal fix is important to get in first.

Diff Detail

Event Timeline

jmorse created this revision.Feb 13 2020, 5:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2020, 5:16 AM
Orlando added inline comments.Feb 13 2020, 5:30 AM
debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
45

In Warning.py there's a warning wrapper function warn(context, msg, flag=None). I think we should use that for consistency (it checks if the user has disabled warnings)?

jmorse updated this revision to Diff 244418.Feb 13 2020, 6:33 AM

Sounds good, how's this?

Orlando accepted this revision.Feb 13 2020, 6:43 AM
This revision is now accepted and ready to land.Feb 13 2020, 6:43 AM
Orlando added inline comments.Feb 13 2020, 6:44 AM
debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
37–38

Is this used anywhere?

This revision was automatically updated to reflect the committed changes.