<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - lld/test/MachO tests should require shell less"
   href="https://bugs.llvm.org/show_bug.cgi?id=49512">49512</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld/test/MachO tests should require shell less
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>MachO
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>gkm@fb.com, jezreel@gmail.com, llvm-bugs@lists.llvm.org, smeenai@fb.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>LLVM is a cross-platform project, and tests should run on all platforms as much
as possible. People should be able to hack on lld/MachO on Windows if they so
choose.

Despite lld/MachO being the youngest lld port, it already has the most tests
that require shell:

thakis@MBP llvm-project % rg -l shell lld/test/COFF | wc -l
       3
thakis@MBP llvm-project % rg -l shell lld/test/ELF | wc -l
       5
thakis@MBP llvm-project % rg -l shell lld/test/MachO | wc -l
       7


This is a bad pattern and we should stop it. It looks almost all of these are
due to this pattern:

# RUN: (llvm-objdump --syms %t.basic; llvm-objdump --macho --function-starts
%t.basic) | FileCheck %s --check-prefix=BASIC


Instead, we probably just:

# RUN: llvm-objdump --syms %t.basic > %t-objdump.txt
# RUN: llvm-objdump --macho --function-starts %t.basic >> %t-objdump.txt
# RUN: FileCheck %s --check-prefix=BASIC < %t-objdump.txt

That's marginally longer, but it's easy to understand. Alternatively, maybe we
could change llvm-objdump to be able to dump both symbols and something else
but dump symbols first."Slightly longer but easy to understand" seems like a
good option to me though :)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>