aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-declextract/testdata/cover.c.json
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-04-10 11:34:39 +0200
committerDmitry Vyukov <dvyukov@google.com>2025-04-10 17:07:48 +0000
commit1bc60a19f725612590947493424fef2e314bd044 (patch)
tree3be2c55ec8612d430845327602d832d6eb01b479 /tools/syz-declextract/testdata/cover.c.json
parent2d9fa31cf7abaddf944824814053e67b4d5c478e (diff)
tools/syz-declextract: add interface coverage info
Add coverage percent for kernel interfaces. The current data is generated with Mar coverage report on kernel commit 1e7857b28020ba57ca7fdafae7ac855ba326c697.
Diffstat (limited to 'tools/syz-declextract/testdata/cover.c.json')
-rw-r--r--tools/syz-declextract/testdata/cover.c.json142
1 files changed, 142 insertions, 0 deletions
diff --git a/tools/syz-declextract/testdata/cover.c.json b/tools/syz-declextract/testdata/cover.c.json
new file mode 100644
index 000000000..c34bc0a20
--- /dev/null
+++ b/tools/syz-declextract/testdata/cover.c.json
@@ -0,0 +1,142 @@
+{
+ "functions": [
+ {
+ "name": "__do_sys_cover",
+ "file": "cover.c",
+ "start_line": 23,
+ "end_line": 37,
+ "scopes": [
+ {
+ "arg": -1,
+ "facts": [
+ {
+ "src": {
+ "local": {
+ "name": "tmp"
+ }
+ },
+ "dst": {
+ "return": {
+ "func": "__do_sys_cover"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "arg": 0,
+ "values": [
+ "COVER_IOCTL1"
+ ],
+ "start_line": 27,
+ "end_line": 29
+ },
+ {
+ "arg": 0,
+ "values": [
+ "COVER_IOCTL2"
+ ],
+ "start_line": 29,
+ "end_line": 31
+ },
+ {
+ "arg": 0,
+ "values": [
+ "COVER_IOCTL3",
+ "COVER_IOCTL4"
+ ],
+ "start_line": 31,
+ "end_line": 35,
+ "calls": [
+ "cover_helper"
+ ],
+ "facts": [
+ {
+ "src": {
+ "argument": {
+ "func": "__do_sys_cover",
+ "arg": 0
+ }
+ },
+ "dst": {
+ "argument": {
+ "func": "cover_helper",
+ "arg": 0
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "cover_helper",
+ "file": "cover.c",
+ "start_line": 11,
+ "end_line": 21,
+ "is_static": true,
+ "scopes": [
+ {
+ "arg": -1
+ },
+ {
+ "arg": 0,
+ "values": [
+ "COVER_IOCTL3"
+ ],
+ "start_line": 15,
+ "end_line": 17
+ },
+ {
+ "arg": 0,
+ "values": [
+ "COVER_IOCTL4"
+ ],
+ "start_line": 17,
+ "end_line": 20
+ }
+ ]
+ }
+ ],
+ "consts": [
+ {
+ "name": "COVER_IOCTL1",
+ "filename": "cover.c",
+ "value": 1
+ },
+ {
+ "name": "COVER_IOCTL2",
+ "filename": "cover.c",
+ "value": 2
+ },
+ {
+ "name": "COVER_IOCTL3",
+ "filename": "cover.c",
+ "value": 3
+ },
+ {
+ "name": "COVER_IOCTL4",
+ "filename": "cover.c",
+ "value": 4
+ }
+ ],
+ "syscalls": [
+ {
+ "func": "__do_sys_cover",
+ "args": [
+ {
+ "name": "cmd",
+ "counted_by": -1,
+ "type": {
+ "int": {
+ "byte_size": 4,
+ "name": "int",
+ "base": "int"
+ }
+ }
+ }
+ ],
+ "source_file": "cover.c"
+ }
+ ]
+} \ No newline at end of file