Skip to contentSkip to conversation

scripts/coverity-scan/COMPONENTS.md: Update paths to match gitlab CI

PATCH Superseded Peter Maydell 2 participants 4 messages May 31, 2024 – Jun 4, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/coverity-scan/COMPONENTS.md: Update paths to match gitlab CI

Since commit 83aa1baa069c we have been running the build for Coverity Scan as a Gitlab CI job, rather than the old setup where it was run on a local developer's machine. This is working well, but the absolute paths of files are different for the Gitlab CI job, which means that the regexes we use to identify Coverity components no longer work. With Gitlab CI builds the file paths are of the form
/builds/qemu-project/qemu/accel/kvm/kvm-all.c

rather than the old
/qemu/accel/kvm/kvm-all.c

and our regexes all don't match.

Update all the regexes to start with .*/qemu/ . This will hopefully avoid the need to change them again in future if the build path changes again.

This change was made with a search-and-replace of (/qemu)? to .*/qemu .

---
As usual with COMPONENTS.md changes, somebody with Coverity admin access needs to make all the changes by hand in the GUI once this has gone through code review :-(

If there are any other changes we want to make to our component regexes, now would be a great time to suggest them, because this change is going to involve "delete every existing component and recreate"...

---
 scripts/coverity-scan/COMPONENTS.md | 104 ++++++++++++++--------------
 1 file changed, 52 insertions(+), 52 deletions(-)
scripts/coverity-scan/COMPONENTS.md +52 -52
index 1537e49cd5a..98d4bcd6a50 100644
@@ -1,157 +1,157 @@
 This is the list of currently configured Coverity components:
 
 alpha
-  ~ (/qemu)?((/include)?/hw/alpha/.*|/target/alpha/.*)
+  ~ .*/qemu((/include)?/hw/alpha/.*|/target/alpha/.*)
 
 arm
-  ~ (/qemu)?((/include)?/hw/arm/.*|(/include)?/hw/.*/(arm|allwinner-a10|bcm28|digic|exynos|imx|omap|stellaris|pxa2xx|versatile|zynq|cadence).*|/hw/net/xgmac.c|/hw/ssi/xilinx_spips.c|/target/arm/.*)
+  ~ .*/qemu((/include)?/hw/arm/.*|(/include)?/hw/.*/(arm|allwinner-a10|bcm28|digic|exynos|imx|omap|stellaris|pxa2xx|versatile|zynq|cadence).*|/hw/net/xgmac.c|/hw/ssi/xilinx_spips.c|/target/arm/.*)
 
 avr
-  ~ (/qemu)?((/include)?/hw/avr/.*|/target/avr/.*)
+  ~ .*/qemu((/include)?/hw/avr/.*|/target/avr/.*)
 
 cris
-  ~ (/qemu)?((/include)?/hw/cris/.*|/target/cris/.*)
+  ~ .*/qemu((/include)?/hw/cris/.*|/target/cris/.*)
 
 hexagon-gen (component should be ignored in analysis)
-  ~ (/qemu)?(/target/hexagon/.*generated.*)
+  ~ .*/qemu(/target/hexagon/.*generated.*)
 
 hexagon
-  ~ (/qemu)?(/target/hexagon/.*)
+  ~ .*/qemu(/target/hexagon/.*)
 
 hppa
-  ~ (/qemu)?((/include)?/hw/hppa/.*|/target/hppa/.*)
+  ~ .*/qemu((/include)?/hw/hppa/.*|/target/hppa/.*)
 
 i386
-  ~ (/qemu)?((/include)?/hw/i386/.*|/target/i386/.*|/hw/intc/[^/]*apic[^/]*\.c)
+  ~ .*/qemu((/include)?/hw/i386/.*|/target/i386/.*|/hw/intc/[^/]*apic[^/]*\.c)
 
 loongarch
-  ~ (/qemu)?((/include)?/hw/(loongarch/.*|.*/loongarch.*)|/target/loongarch/.*)
+  ~ .*/qemu((/include)?/hw/(loongarch/.*|.*/loongarch.*)|/target/loongarch/.*)
 
 m68k
-  ~ (/qemu)?((/include)?/hw/m68k/.*|/target/m68k/.*|(/include)?/hw(/.*)?/mcf.*|(/include)?/hw/nubus/.*)
+  ~ .*/qemu((/include)?/hw/m68k/.*|/target/m68k/.*|(/include)?/hw(/.*)?/mcf.*|(/include)?/hw/nubus/.*)
 
 microblaze
-  ~ (/qemu)?((/include)?/hw/microblaze/.*|/target/microblaze/.*)
+  ~ .*/qemu((/include)?/hw/microblaze/.*|/target/microblaze/.*)
 
 mips
-  ~ (/qemu)?((/include)?/hw/mips/.*|/target/mips/.*)
+  ~ .*/qemu((/include)?/hw/mips/.*|/target/mips/.*)
 
 openrisc
-  ~ (/qemu)?((/include)?/hw/openrisc/.*|/target/openrisc/.*)
+  ~ .*/qemu((/include)?/hw/openrisc/.*|/target/openrisc/.*)
 
 ppc
-  ~ (/qemu)?((/include)?/hw/ppc/.*|/target/ppc/.*|/hw/pci-host/(uninorth.*|dec.*|prep.*|ppc.*)|/hw/misc/macio/.*|(/include)?/hw/.*/(xics|openpic|spapr).*)
+  ~ .*/qemu((/include)?/hw/ppc/.*|/target/ppc/.*|/hw/pci-host/(uninorth.*|dec.*|prep.*|ppc.*)|/hw/misc/macio/.*|(/include)?/hw/.*/(xics|openpic|spapr).*)
 
 riscv
-  ~ (/qemu)?((/include)?/hw/riscv/.*|/target/riscv/.*|/hw/.*/(riscv_|ibex_|sifive_).*)
+  ~ .*/qemu((/include)?/hw/riscv/.*|/target/riscv/.*|/hw/.*/(riscv_|ibex_|sifive_).*)
 
 rx
-  ~ (/qemu)?((/include)?/hw/rx/.*|/target/rx/.*)
+  ~ .*/qemu((/include)?/hw/rx/.*|/target/rx/.*)
 
 s390
-  ~ (/qemu)?((/include)?/hw/s390x/.*|/target/s390x/.*|/hw/.*/s390_.*)
+  ~ .*/qemu((/include)?/hw/s390x/.*|/target/s390x/.*|/hw/.*/s390_.*)
 
 sh4
-  ~ (/qemu)?((/include)?/hw/sh4/.*|/target/sh4/.*)
+  ~ .*/qemu((/include)?/hw/sh4/.*|/target/sh4/.*)
 
 sparc
-  ~ (/qemu)?((/include)?/hw/sparc(64)?.*|/target/sparc/.*|/hw/.*/grlib.*|/hw/display/cg3.c)
+  ~ .*/qemu((/include)?/hw/sparc(64)?.*|/target/sparc/.*|/hw/.*/grlib.*|/hw/display/cg3.c)
 
 tricore
-  ~ (/qemu)?((/include)?/hw/tricore/.*|/target/tricore/.*)
+  ~ .*/qemu((/include)?/hw/tricore/.*|/target/tricore/.*)
 
 xtensa
-  ~ (/qemu)?((/include)?/hw/xtensa/.*|/target/xtensa/.*)
+  ~ .*/qemu((/include)?/hw/xtensa/.*|/target/xtensa/.*)
 
 9pfs
-  ~ (/qemu)?(/hw/9pfs/.*|/fsdev/.*)
+  ~ .*/qemu(/hw/9pfs/.*|/fsdev/.*)
 
 audio
-  ~ (/qemu)?((/include)?/(audio|hw/audio)/.*)
+  ~ .*/qemu((/include)?/(audio|hw/audio)/.*)
 
 block
-  ~ (/qemu)?(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
+  ~ .*/qemu(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
 
 char
-  ~ (/qemu)?(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)
+  ~ .*/qemu(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)
 
 crypto
-  ~ (/qemu)?((/include)?/crypto/.*|/hw/.*/.*crypto.*|(/include/sysemu|/backends)/cryptodev.*)
+  ~ .*/qemu((/include)?/crypto/.*|/hw/.*/.*crypto.*|(/include/sysemu|/backends)/cryptodev.*)
 
 disas
-  ~ (/qemu)?((/include)?/disas.*)
+  ~ .*/qemu((/include)?/disas.*)
 
 fpu
-  ~ (/qemu)?((/include)?(/fpu|/libdecnumber)/.*)
+  ~ .*/qemu((/include)?(/fpu|/libdecnumber)/.*)
 
 io
-  ~ (/qemu)?((/include)?/io/.*)
+  ~ .*/qemu((/include)?/io/.*)
 
 ipmi
-  ~ (/qemu)?((/include)?/hw/ipmi/.*)
+  ~ .*/qemu((/include)?/hw/ipmi/.*)
 
 migration
-  ~ (/qemu)?((/include)?/migration/.*)
+  ~ .*/qemu((/include)?/migration/.*)
 
 monitor
-  ~ (/qemu)?(/qapi.*|/qobject/.*|/monitor\..*|/[hq]mp\..*)
+  ~ .*/qemu(/qapi.*|/qobject/.*|/monitor\..*|/[hq]mp\..*)
 
 nbd
-  ~ (/qemu)?(/nbd/.*|/include/block/nbd.*|/qemu-nbd\.c)
+  ~ .*/qemu(/nbd/.*|/include/block/nbd.*|/qemu-nbd\.c)
 
 net
-  ~ (/qemu)?((/include)?(/hw)?/(net|rdma)/.*)
+  ~ .*/qemu((/include)?(/hw)?/(net|rdma)/.*)
 
 pci
-  ~ (/qemu)?(/include)?/hw/(cxl/|pci).*
+  ~ .*/qemu(/include)?/hw/(cxl/|pci).*
 
 qemu-ga
-  ~ (/qemu)?(/qga/.*)
+  ~ .*/qemu(/qga/.*)
 
 scsi
-  ~ (/qemu)?(/scsi/.*|/hw/scsi/.*|/include/hw/scsi/.*)
+  ~ .*/qemu(/scsi/.*|/hw/scsi/.*|/include/hw/scsi/.*)
 
 trace
-  ~ (/qemu)?(/.*trace.*\.[ch])
+  ~ .*/qemu(/.*trace.*\.[ch])
 
 ui
-  ~ (/qemu)?((/include)?(/ui|/hw/display|/hw/input)/.*)
+  ~ .*/qemu((/include)?(/ui|/hw/display|/hw/input)/.*)
 
 usb
-  ~ (/qemu)?(/hw/usb/.*|/include/hw/usb/.*)
+  ~ .*/qemu(/hw/usb/.*|/include/hw/usb/.*)
 
 user
-  ~ (/qemu)?(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*)
+  ~ .*/qemu(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*)
 
 util
-  ~ (/qemu)?(/util/.*|/include/qemu/.*)
+  ~ .*/qemu(/util/.*|/include/qemu/.*)
 
 vfio
-  ~ (/qemu)?(/include)?/hw/vfio/.*
+  ~ .*/qemu(/include)?/hw/vfio/.*
 
 virtio
-  ~ (/qemu)?(/include)?/hw/virtio/.*
+  ~ .*/qemu(/include)?/hw/virtio/.*
 
 xen
-  ~ (/qemu)?(.*/xen.*)
+  ~ .*/qemu(.*/xen.*)
 
 hvf
-  ~ (/qemu)?(.*/hvf.*)
+  ~ .*/qemu(.*/hvf.*)
 
 kvm
-  ~ (/qemu)?(.*/kvm.*)
+  ~ .*/qemu(.*/kvm.*)
 
 tcg
-  ~ (/qemu)?(/accel/tcg|/replay|/tcg)/.*
+  ~ .*/qemu(/accel/tcg|/replay|/tcg)/.*
 
 sysemu
-  ~ (/qemu)?(/system/.*|/accel/.*)
+  ~ .*/qemu(/system/.*|/accel/.*)
 
 (headers)
-  ~ (/qemu)?(/include/.*)
+  ~ .*/qemu(/include/.*)
 
 testlibs
-  ~ (/qemu)?(/tests/qtest(/libqos/.*|/libqtest.*))
+  ~ .*/qemu(/tests/qtest(/libqos/.*|/libqtest.*))
 
 tests
-  ~ (/qemu)?(/tests/.*)
+  ~ .*/qemu(/tests/.*)
Signature · 1 line
2.34.1
#1 lore raw

Hi Peter,

Quoted 40 lines · Peter Maydell

Since commit 83aa1baa069c we have been running the build for Coverity Scan as a Gitlab CI job, rather than the old setup where it was run on a local developer's machine. This is working well, but the absolute paths of files are different for the Gitlab CI job, which means that the regexes we use to identify Coverity components no longer work. With Gitlab CI builds the file paths are of the form
/builds/qemu-project/qemu/accel/kvm/kvm-all.c

rather than the old
/qemu/accel/kvm/kvm-all.c

and our regexes all don't match.

Update all the regexes to start with .*/qemu/ . This will hopefully avoid the need to change them again in future if the build path changes again.

This change was made with a search-and-replace of (/qemu)? to .*/qemu .

---
As usual with COMPONENTS.md changes, somebody with Coverity admin access needs to make all the changes by hand in the GUI once this has gone through code review :-(

If there are any other changes we want to make to our component regexes, now would be a great time to suggest them, because this change is going to involve "delete every existing component and recreate"...

---
  scripts/coverity-scan/COMPONENTS.md | 104 ++++++++++++++--------------
  1 file changed, 52 insertions(+), 52 deletions(-)
scripts/coverity-scan/COMPONENTS.md +0 -0
index 1537e49cd5a..98d4bcd6a50 100644

scripts/coverity-scan/COMPONENTS.md line 5

Quoted 6 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
@@ -1,157 +1,157 @@
  This is the list of currently configured Coverity components:
 
 
  block
-  ~ (/qemu)?(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
+  ~ .*/qemu(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)

util/block-helpers.[ch]

I'd put hw/block/ to another bucket that the block subsystem.

scripts/coverity-scan/COMPONENTS.md line 76

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  char
-  ~ (/qemu)?(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)
+  ~ .*/qemu(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)

Is 'char' the same as 'chardev'?

scripts/coverity-scan/COMPONENTS.md line 79

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  crypto
-  ~ (/qemu)?((/include)?/crypto/.*|/hw/.*/.*crypto.*|(/include/sysemu|/backends)/cryptodev.*)
+  ~ .*/qemu((/include)?/crypto/.*|/hw/.*/.*crypto.*|(/include/sysemu|/backends)/cryptodev.*)

Maybe worth covering host/include/*/host/crypto/?

scripts/coverity-scan/COMPONENTS.md line 82

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  disas
-  ~ (/qemu)?((/include)?/disas.*)
+  ~ .*/qemu((/include)?/disas.*)

Missing:

target/avr/disas.c
target/loongarch/disas.c
target/openrisc/disas.c
target/rx/disas.c

scripts/coverity-scan/COMPONENTS.md line 94

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  migration
-  ~ (/qemu)?((/include)?/migration/.*)
+  ~ .*/qemu((/include)?/migration/.*)

Not sure about:

hw/vfio/migration.c

scripts/coverity-scan/COMPONENTS.md line 97

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  monitor
-  ~ (/qemu)?(/qapi.*|/qobject/.*|/monitor\..*|/[hq]mp\..*)
+  ~ .*/qemu(/qapi.*|/qobject/.*|/monitor\..*|/[hq]mp\..*)

Apparently the pattern is now foo-[hq]mp-cmds.[ch].

Not matched:
hmp-commands-info.hx
hmp-commands.hx
hw/virtio/virtio-qmp.[ch]
include/qapi/qmp-event.h
job-qmp.c
monitor/qemu-config-qmp.c
python/qemu/qmp/events.py
scripts/python_qmp_updater.py
tests/unit/test-qmp-event.c

Not sure about (not covered in testlibs):

tests/qtest/libqmp.c
tests/qtest/libqmp.h

scripts/coverity-scan/COMPONENTS.md line 136

Quoted 11 lines
scripts/coverity-scan/COMPONENTS.md +3 -3
  trace
-  ~ (/qemu)?(/.*trace.*\.[ch])
+  ~ .*/qemu(/.*trace.*\.[ch])
 
  user
-  ~ (/qemu)?(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*)
+  ~ .*/qemu(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*)
 
  xen
-  ~ (/qemu)?(.*/xen.*)
+  ~ .*/qemu(.*/xen.*)

We could match .*xen.* like trace (ditto other accelerators).

Quoted 15 lines
scripts/coverity-scan/COMPONENTS.md +4 -4
  hvf
-  ~ (/qemu)?(.*/hvf.*)
+  ~ .*/qemu(.*/hvf.*)
 
  kvm
-  ~ (/qemu)?(.*/kvm.*)
+  ~ .*/qemu(.*/kvm.*)
 
  tcg
-  ~ (/qemu)?(/accel/tcg|/replay|/tcg)/.*
+  ~ .*/qemu(/accel/tcg|/replay|/tcg)/.*
 
  sysemu
-  ~ (/qemu)?(/system/.*|/accel/.*)
+  ~ .*/qemu(/system/.*|/accel/.*)
#2 lore raw
Quoted 22 lines · Philippe Mathieu-Daudé

Hi Peter,

Quoted 15 lines · Peter Maydell

If there are any other changes we want to make to our component regexes, now would be a great time to suggest them, because this change is going to involve "delete every existing component and recreate"...

---
  scripts/coverity-scan/COMPONENTS.md | 104 ++++++++++++++--------------
  1 file changed, 52 insertions(+), 52 deletions(-)
scripts/coverity-scan/COMPONENTS.md +0 -0
index 1537e49cd5a..98d4bcd6a50 100644
@@ -1,157 +1,157 @@
  This is the list of currently configured Coverity components:
Quoted 7 lines

scripts/coverity-scan/COMPONENTS.md line 73

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  block
-  ~ (/qemu)?(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
+  ~ .*/qemu(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)

util/block-helpers.[ch]

I'd put hw/block/ to another bucket that the block subsystem.

MAINTAINERS considers both block/ and hw/block/ to be part of the "block layer core".

Quoted 5 lines

scripts/coverity-scan/COMPONENTS.md line 76

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  char
-  ~ (/qemu)?(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)
+  ~ .*/qemu(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)

Is 'char' the same as 'chardev'?

Good question. It looks like we don't cover chardev at all currently. I guess we should probably prefer to track chardev separately. qemu-char.c and include/sysemu/char.h don't exist any more.

Quoted 5 lines

scripts/coverity-scan/COMPONENTS.md line 79

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  crypto
-  ~ (/qemu)?((/include)?/crypto/.*|/hw/.*/.*crypto.*|(/include/sysemu|/backends)/cryptodev.*)
+  ~ .*/qemu((/include)?/crypto/.*|/hw/.*/.*crypto.*|(/include/sysemu|/backends)/cryptodev.*)

Maybe worth covering host/include/*/host/crypto/?

Seems reasonable.

Quoted 10 lines

scripts/coverity-scan/COMPONENTS.md line 82

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  disas
-  ~ (/qemu)?((/include)?/disas.*)
+  ~ .*/qemu((/include)?/disas.*)

Missing:

target/avr/disas.c
target/loongarch/disas.c
target/openrisc/disas.c
target/rx/disas.c

Why do these targets not put their disassembler in disas/ like all the others? We can't really catch them with a wildcard, because the target entry earlier will match first. I'm kind of inclined to leave these as-is, because if somebody put the disassembler in target/ then having it appear in the component for that target is fine for it being basically classified to get the attention of the right person.

Quoted 7 lines

scripts/coverity-scan/COMPONENTS.md line 94

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  migration
-  ~ (/qemu)?((/include)?/migration/.*)
+  ~ .*/qemu((/include)?/migration/.*)

Not sure about:

hw/vfio/migration.c

I think that's correctly classified under vfio.

Quoted 9 lines

scripts/coverity-scan/COMPONENTS.md line 97

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  monitor
-  ~ (/qemu)?(/qapi.*|/qobject/.*|/monitor\..*|/[hq]mp\..*)
+  ~ .*/qemu(/qapi.*|/qobject/.*|/monitor\..*|/[hq]mp\..*)

Apparently the pattern is now foo-[hq]mp-cmds.[ch].

Not matched:
hmp-commands-info.hx
hmp-commands.hx

These aren't C, and because hxtool doesn't try to preserve file-and-line-number info for them I don't think Coverity will ever report an issue in them.

Quoted 1 line

hw/virtio/virtio-qmp.[ch]

correctly matched under "virtio"

Quoted 3 lines

include/qapi/qmp-event.h
job-qmp.c
monitor/qemu-config-qmp.c

Yeah, these should all be monitor.

Quoted 2 lines

python/qemu/qmp/events.py
scripts/python_qmp_updater.py

No point in caring much about the classification for non-C files, since Coverity is only scanning C code.

Quoted 6 lines

tests/unit/test-qmp-event.c

Not sure about (not covered in testlibs):

tests/qtest/libqmp.c
tests/qtest/libqmp.h

Yes, we should expand testlibs to cover these.

Quoted 8 lines
Quoted 7 lines
scripts/coverity-scan/COMPONENTS.md +2 -2
  trace
-  ~ (/qemu)?(/.*trace.*\.[ch])
+  ~ .*/qemu(/.*trace.*\.[ch])
 
  user
-  ~ (/qemu)?(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*)
+  ~ .*/qemu(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*)
Quoted 5 lines

scripts/coverity-scan/COMPONENTS.md line 136

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
  xen
-  ~ (/qemu)?(.*/xen.*)
+  ~ .*/qemu(.*/xen.*)

We could match .*xen.* like trace (ditto other accelerators).

That would produce mis-hits on audio/mixeng.c. The wide match on trace actually also has mis-hits because it matches on os-strace.h in the bsd-user subdirectories. So I think it would be better to make the trace component look only for trace.*\.[ch] rather than to change this.

Quoted 8 lines
Quoted 8 lines
scripts/coverity-scan/COMPONENTS.md +2 -2
  hvf
-  ~ (/qemu)?(.*/hvf.*)
+  ~ .*/qemu(.*/hvf.*)
 
  kvm
-  ~ (/qemu)?(.*/kvm.*)
+  ~ .*/qemu(.*/kvm.*)
 
Quoted 7 lines

scripts/coverity-scan/COMPONENTS.md line 148

Quoted 7 lines
scripts/coverity-scan/COMPONENTS.md +2 -2
  tcg
-  ~ (/qemu)?(/accel/tcg|/replay|/tcg)/.*
+  ~ .*/qemu(/accel/tcg|/replay|/tcg)/.*
 
  sysemu
-  ~ (/qemu)?(/system/.*|/accel/.*)
+  ~ .*/qemu(/system/.*|/accel/.*)

thanks
-- PMM

#3 lore raw
Quoted 27 lines · Peter Maydell
Quoted 26 lines · Philippe Mathieu-Daudé

Hi Peter,

Quoted 20 lines · Peter Maydell

If there are any other changes we want to make to our component regexes, now would be a great time to suggest them, because this change is going to involve "delete every existing component and recreate"...

---
   scripts/coverity-scan/COMPONENTS.md | 104 ++++++++++++++--------------
   1 file changed, 52 insertions(+), 52 deletions(-)
scripts/coverity-scan/COMPONENTS.md +1 -1
index 1537e49cd5a..98d4bcd6a50 100644
@@ -1,157 +1,157 @@
   This is the list of currently configured Coverity components:
 
 
   block
-  ~ (/qemu)?(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
+  ~ .*/qemu(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
Quoted 6 lines
Quoted 3 lines

util/block-helpers.[ch]

I'd put hw/block/ to another bucket that the block subsystem.

MAINTAINERS considers both block/ and hw/block/ to be part of the "block layer core".

Personally I'd look at hw/block/ issues and skip block/ ones :P

Quoted 11 lines
Quoted 10 lines

scripts/coverity-scan/COMPONENTS.md line 82

Quoted 3 lines
scripts/coverity-scan/COMPONENTS.md +1 -1
   disas
-  ~ (/qemu)?((/include)?/disas.*)
+  ~ .*/qemu((/include)?/disas.*)

Missing:

target/avr/disas.c
target/loongarch/disas.c
target/openrisc/disas.c
target/rx/disas.c

Quoted 7 lines

Why do these targets not put their disassembler in disas/ like all the others? We can't really catch them with a wildcard, because the target entry earlier will match first. I'm kind of inclined to leave these as-is, because if somebody put the disassembler in target/ then having it appear in the component for that target is fine for it being basically classified to get the attention of the right person.

disas/ is for non-decodetree disassemblers imported from BFD library. Decodetree based belong to each target/foo/. So I agree keeping as-is is OK.

Regards,

Phil.