Skip to content

Moving code coverage from ubuntu-arm to ubuntu-x86 #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kr-2003
Copy link
Contributor

@kr-2003 kr-2003 commented Jul 9, 2025

Description

This PR makes the code coverage using the ubuntu's x86 machine instead of using arm machine.

Type of change

  • New feature

Checklist

  • I have read the contribution guide recently

@kr-2003 kr-2003 changed the title Moving code coverage from ubunut-arm to ubuntu-x86 Moving code coverage from ubuntu-arm to ubuntu-x86 Jul 9, 2025
Copy link
Collaborator

@mcbarton mcbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was requested as apparantly opp only works ob Ubuntu x86 (still waiting to hear why). It makes more sense to me to move coverage to the oop job in that PR.

@kr-2003
Copy link
Contributor Author

kr-2003 commented Jul 9, 2025

This was requested as apparantly opp only works ob Ubuntu x86 (still waiting to hear why). It makes more sense to me to move coverage to the oop job in that PR.

The reason why it works for ub-x86 and not ub-arm, is because the LLVM side of code does not handle the ub-arm case. There might be some issues with ubuntu-arm supporting, that we might not know.

https://github.com/llvm/llvm-project/blob/337bc916435f40b0e6f32e197237f007a4c6ee57/clang/tools/clang-repl/ClangRepl.cpp#L117C1-L135C1

    if (SystemTriple.isOSBinFormatELF())
      OrcRuntimePath =
          BasePath.str().str() + "/lib/x86_64-unknown-linux-gnu/liborc_rt.a";
    else if (SystemTriple.isOSBinFormatMachO())
      OrcRuntimePath = BasePath.str().str() + "/lib/darwin/liborc_rt_osx.a";
    else
      return llvm::make_error<llvm::StringError>(
          "Out-of-process execution is not supported on non-unix platforms",
          llvm::inconvertibleErrorCode());

[EDIT]

Seems like it only creates these lib:

  1. /lib/x86_64-unknown-linux-gnu/liborc_rt.a
  2. /lib/darwin/liborc_rt_osx.a"

@anutosh491
Copy link
Collaborator

This was requested as apparantly opp only works ob Ubuntu x86 (still waiting to hear why). It makes more sense to me to move coverage to the oop job in that PR.

This stands discussed in an internal channel between GSoC mentors (me, Vipul, Vassil) and our mentee (Abhinav) .

Currently Abhinav plans on running tests 3 times in the oop build

  1. inprocess without valgrind
  2. inprocess with valgrind
  3. outprocess without valgrind

And we would need to switch to ubuntu-x86 for code coverage

@kr-2003
Copy link
Contributor Author

kr-2003 commented Jul 9, 2025

@mcbarton And regarding moving it to x86 machine:

  1. I get this error:
geninfo: ERROR: mismatched end line for _ZN37DynamicLibraryManagerTest_Sanity_Test8TestBodyEv at /home/runner/work/CppInterOp/CppInterOp/unittests/CppInterOp/DynamicLibraryManagerTest.cpp:22: 22 -> 67
	(use "geninfo --ignore-errors mismatch ..." to bypass this error)

while running coverage on x86. Does there is some cache that codecov uses? Because it might be matching our source code(in x86) with something that has been cached in previous runs(in arm). Check this out

  1. Even after using --ignore-errors mismatch, then I got this error:
lcov: ERROR: 'exclude' pattern '/home/runner/.cache/*' is unused.
	(use "lcov --ignore-errors unused ..." to bypass this error)

This kind of proves that codecov does uses some kind of cache.
Check this out

Do we need to delete some files before running these coverage tests on x86?

@mcbarton
Copy link
Collaborator

mcbarton commented Jul 9, 2025

This was requested as apparantly opp only works ob Ubuntu x86 (still waiting to hear why). It makes more sense to me to move coverage to the oop job in that PR.

This stands discussed in an internal channel between GSoC mentors (me, Vipul, Vassil) and our mentee (Abhinav) .

Currently Abhinav plans on running tests 3 times in the oop build

  1. inprocess without valgrind
  2. inprocess with valgrind
  3. outprocess without valgrind

And we would need to switch to ubuntu-x86 for code coverage

I still thinks best to switch to ubuntu x86 on the oop PR. Otherwise you'll end up switching it to a non oop job here, and then probably have to switch it to a opp job in that PR anyway.

@kr-2003 You do not need to delete any file to switch the coverage. As far as how to get past that error I do not know off the top of my head. I know it doesn't have anything specific to do with changing to x86. This error has come up before, and is the reason the old coverage job is on a Ubuntu 22.04 runner (I was too lazy previously to work out why I got this error on a Ubuntu 24.04, since it didn't impede any other work).

@kr-2003
Copy link
Contributor Author

kr-2003 commented Jul 9, 2025

I still thinks best to switch to ubuntu x86 on the oop PR. Otherwise you'll end up switching it to a non oop job here, and then probably have to switch it to a opp job in that PR anyway.

Ok

@Vipul-Cariappa
Copy link
Collaborator

@kr-2003 could you rebase this branch with master? If not already done.

Copy link

codecov bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.18%. Comparing base (98e07e7) to head (12ce997).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #660   +/-   ##
=======================================
  Coverage   79.18%   79.18%           
=======================================
  Files           9        9           
  Lines        3853     3853           
=======================================
  Hits         3051     3051           
  Misses        802      802           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants