<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>107959</bug_id>
          
          <creation_ts>2013-01-25 09:55:31 -0800</creation_ts>
          <short_desc>NRWT should set TMPDIR and delete it after DRT has finished</short_desc>
          <delta_ts>2013-01-28 18:49:26 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tony Chang">tony</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alancutter</cc>
    
    <cc>dpranke</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>816687</commentid>
    <comment_count>0</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2013-01-25 09:55:31 -0800</bug_when>
    <thetext>Chromium&apos;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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816723</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-25 10:26:59 -0800</bug_when>
    <thetext>webkitpy can set this in setup_environ_for_server:
http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py#L876</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816762</commentid>
    <comment_count>2</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2013-01-25 11:06:34 -0800</bug_when>
    <thetext>On bug 107905, eric said:

&gt; Yeah, I briefly considered this, but wasn&apos;t sure how well the TMPDIR environment variable would be support by all the code we care about. :)  I&apos;m sure some parts hard-code /tmp.

It&apos;s probably rare in the Chromium code to hard code /tmp since that wouldn&apos;t work on Windows.

To clarify, setting TMPDIR will work on Linux only.  On Windows, we would have to set TEMP, on OSX, I&apos;m not sure.  This code is controlled by the GetTempDir functions in chromium&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>818383</commentid>
    <comment_count>3</comment_count>
    <who name="Alan Cutter">alancutter</who>
    <bug_when>2013-01-28 18:49:26 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>