Skip to contentSkip to conversation

automation/gitlab: disable coverage from clang randconfig

PATCH In review Roger Pau Monne 5 participants 8 messages Jan 14, 2025 – Jan 15, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 automation/gitlab: disable coverage from clang randconfig

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

---
Cc: Oleksii Kurochko <[email protected]>
---
I will fix the orphaned section stuff separately, as I'm considering just removing LLVM coverage support because the llvm coverage format is not stable, and the code to dump it has already become stale. However I need to think about it, and in the short term disabling coverage support from randconfig is more straightforward.

---
 automation/gitlab-ci/build.yaml | 2 ++
 1 file changed, 2 insertions(+)
automation/gitlab-ci/build.yaml +2 -0
index cb84f379b754..bc4a8a5ad20c 100644
@@ -556,6 +556,8 @@ debian-12-x86_64-clang-randconfig:
   variables:
     CONTAINER: debian:12-x86_64
     RANDCONFIG: y
+    EXTRA_FIXED_RANDCONFIG: |
+      CONFIG_COVERAGE=n # Disable coverage otherwise build times out.
 
 debian-12-x86_64-gcc:
   extends: .gcc-x86-64-build
Signature · 1 line
2.46.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Roger Pau Monne

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

Quoted 8 lines

---
Cc: Oleksii Kurochko <[email protected]>
---
I will fix the orphaned section stuff separately, as I'm considering just removing LLVM coverage support because the llvm coverage format is not stable, and the code to dump it has already become stale. However I need to think about it, and in the short term disabling coverage support from randconfig is more straightforward.

Oh, so it's broken too?  Unless the fix is trivial, we should have a Kconfig level disable on it.  No point letting people turn on something that's broken.

~Andrew

#3 lore raw
In reply to Andrew Cooper
Quoted 8 lines · Andrew Cooper
Quoted 5 lines · Roger Pau Monne

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

Thanks.

Quoted 9 lines
Quoted 8 lines

---
Cc: Oleksii Kurochko <[email protected]>
---
I will fix the orphaned section stuff separately, as I'm considering just removing LLVM coverage support because the llvm coverage format is not stable, and the code to dump it has already become stale. However I need to think about it, and in the short term disabling coverage support from randconfig is more straightforward.

Quoted 3 lines

Oh, so it's broken too?  Unless the fix is trivial, we should have a Kconfig level disable on it.  No point letting people turn on something that's broken.

It's not build time broken, but the format of the buffer that we return in llvm.c dump() function has gotten out of sync with the native format in modern clang versions, and hence coverage tools will refuse to parse it.

I think newer versions of llvm/clang have now included an internal function to dump the buffer, so that we no longer have to attempt to generate it from Xen, I need to see whether that works. Otherwise the only remaining option is to convert the llvm data into gcov format (which is stable), IIRC this is what Linux did.

Thanks, Roger.

#4 lore raw
In reply to Roger Pau Monne
Quoted 3 lines · Roger Pau Monne

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

Just curious: How long is "too long" in this case?

Jan

#5 lore raw
Quoted 5 lines · Jan Beulich
Quoted 3 lines · Roger Pau Monne

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

Just curious: How long is "too long" in this case?

Timeout is currently at 1h, for what is a single build of the hypervisor.

~Andrew

#6 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich
Quoted 3 lines · Roger Pau Monne

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

Just curious: How long is "too long" in this case?

Left it for >30min stuck on the final linker invocation IIRC and it hadn't finished, so no idea really. This was also running on a docker x86-64 container on my ARM mac, so there was an extra layer of emulation.

Thanks, Roger.

#7 lore raw
In reply to Roger Pau Monne
Quoted 5 lines · Roger Pau Monne

If randconfig enables coverage support the build times out due to GNU LD taking too long. For the time being prevent coverage from being enabled in clang randconfig job.

~ Oleksii

Quoted 25 lines

---
Cc: Oleksii Kurochko<[email protected]>
---
I will fix the orphaned section stuff separately, as I'm considering just removing LLVM coverage support because the llvm coverage format is not stable, and the code to dump it has already become stale. However I need to think about it, and in the short term disabling coverage support from randconfig is more straightforward.

---
  automation/gitlab-ci/build.yaml | 2 ++
  1 file changed, 2 insertions(+)
automation/gitlab-ci/build.yaml +2 -0
index cb84f379b754..bc4a8a5ad20c 100644
@@ -556,6 +556,8 @@ debian-12-x86_64-clang-randconfig:
    variables:
      CONTAINER: debian:12-x86_64
      RANDCONFIG: y
+    EXTRA_FIXED_RANDCONFIG: |
+      CONFIG_COVERAGE=n # Disable coverage otherwise build times out.
 
  debian-12-x86_64-gcc:
    extends: .gcc-x86-64-build