Uploaded image for project: 'Swift'
  1. Swift
  2. SR-12142

llvm-cov doesn't work on haswell CPU

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: None
    • Labels:
      None
    • Environment:

      Swift 5.1.4 (via swift:5.1 official docker image)

      GitLab CI cloud runner

      GitHub Actions cloud ubuntu-latest

      Local docker (mac mini 2018 - macOS 10.15.2)

      Description

      I've been trying to use llvm-cov in the Swift docker images to generate and output code coverage reports.

      On my local machine, the following commands work and I get expected test coverage output within the official swift:5.1 docker image (Swift 5.1.4):

      swift test --enable-code-coverage
      
      BINARY_PATH=".build/x86_64-unknown-linux/debug/swift-currencyPackageTests.xctest"
      PROF_DATA_PATH=".build/x86_64-unknown-linux/debug/codecov/default.profdata"
      IGNORE_FILENAME_REGEX="(.build|TestUtils|Tests)"
      
      llvm-cov report \
          $BINARY_PATH \
          --format=text \
          -instr-profile="$PROF_DATA_PATH" \
          -ignore-filename-regex="$IGNORE_FILENAME_REGEX" 

      On GitLab CI, all of the command executes fine - but llvm-cov finds no coverage data and just reports empty lines with 0 coverage.

      GitHub Actions also works, but it correctly provides the expected code coverage like I get on my local machine.

      I have confirmed that all 3 environments are using theĀ exact same Docker image by verifying the digest SHA and Image ID.

      The only difference I can find is the CPU architecture through llvm-cov --version.

      Environment Reported CPU Generates Report?
      Local Docker (iMac 2011) sandybridge yes
      Local Docker (mac mini 2018) skylake yes
      GitHub Actions docker skylake-avx512 yes
      GitLab CI docker haswell no

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mordil Nathan Harris
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: