NEW 107959
NRWT should set TMPDIR and delete it after DRT has finished
https://bugs.webkit.org/show_bug.cgi?id=107959
Summary NRWT should set TMPDIR and delete it after DRT has finished
Tony Chang
Reported 2013-01-25 09:55:31 PST
Chromium's DRT can leak files in /tmp if it crashes during a run. A workaround was added on the bots in bug 107905 to clean up /tmp. Instead, what we could do is set the TMPDIR environment variable for each DRT process and delete that directory when NRWT is finished (and/or when NRWT starts).
Attachments
Eric Seidel (no email)
Comment 1 2013-01-25 10:26:59 PST
Tony Chang
Comment 2 2013-01-25 11:06:34 PST
On bug 107905, eric said: > Yeah, I briefly considered this, but wasn't sure how well the TMPDIR environment variable would be support by all the code we care about. :) I'm sure some parts hard-code /tmp. It's probably rare in the Chromium code to hard code /tmp since that wouldn't work on Windows. To clarify, setting TMPDIR will work on Linux only. On Windows, we would have to set TEMP, on OSX, I'm not sure. This code is controlled by the GetTempDir functions in chromium's base: http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob;f=base/file_util_posix.cc;h=0ffa6247a2f048b8039161d8eaf56e9d55097505;hb=HEAD#l921 http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob;f=base/file_util_mac.mm;h=0638167b77d22d840e35176c2ff603bee277f75c;hb=HEAD#l18 http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob;f=base/file_util_win.cc;h=2fd2399aa6391c2021edba9336ed89b7aa624d3c;hb=HEAD#l305
Alan Cutter
Comment 3 2013-01-28 18:49:26 PST
This is a great solution idea. We could go a step further and have NRWT fail the patch if too many temp files are left behind so leaks of this kind are caught automatically.
Note You need to log in before you can comment on or make changes to this bug.