<div dir="ltr">We should explicitly disallow it.  You should be able to tell by looking at a test's filename what it does.  If two files have the same name, then you wonder why they aren't the same test, and it leaves you with more questions than answers.  If two tests have the same name and they actually *should* be different tests, then that's a very good sign that one or both of them don't have specific enough names.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 7, 2015 at 6:19 AM via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    
      
    
    <div><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a title="NEW --- - Test suit is flaky if 2 tests have the same file name" href="https://llvm.org/bugs/show_bug.cgi?id=25092" target="_blank">25092</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Test suit is flaky if 2 tests have the same file name
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td><a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td><a href="mailto:tberghammer@google.com" target="_blank">tberghammer@google.com</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td><a href="mailto:llvm-bugs@lists.llvm.org" target="_blank">llvm-bugs@lists.llvm.org</a>
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If we have 2 test case with the same file name then the test suit will become
flaky for those tests.

In some ordering of the events (most likely when the 2 test with the same name
run at the same time) one of the test will fail with the following error:

Traceback (most recent call last):
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/dotest.py", line
2019, in <module>
    resultclass=LLDBTestResult).run(suite)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/runner.py",
line 162, in run
    test(result)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/suite.py",
line 64, in __call__
    return self.run(*args, **kwds)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/suite.py",
line 84, in run
    self._wrapped_run(result)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/suite.py",
line 114, in _wrapped_run
    test._wrapped_run(result, debug)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/suite.py",
line 116, in _wrapped_run
    test(result)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/case.py",
line 417, in __call__
    return self.run(*args, **kwds)
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/unittest2/case.py",
line 389, in run
    self.dumpSessionInfo()
  File
"/lldb-buildbot/lldbSlave/buildWorkingDir/llvm/tools/lldb/test/lldbtest.py",
line 1890, in dumpSessionInfo
    os.rename(src, dst)
OSError: [Errno 2] No such file or directory

We should handle the case when 2 test have the same file name or explicitly
disallow it with some check at test case loading time.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </div>

_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div>