aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-declextract/testdata/include
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-04-08 14:11:26 +0200
committerDmitry Vyukov <dvyukov@google.com>2025-04-09 10:27:41 +0000
commit1aed810c86069f8b9b117ccccf083e98bf0da74c (patch)
treee6841902edef7496b3813eea3e31c7c599625c62 /tools/syz-declextract/testdata/include
parent6dfb898e263c6fdb948f1578b0dada1e15b6764e (diff)
tools/syz-declextract: extend test data
Add few interesting cases for scope analysis. Move functions related to resource to the header file, they must be visible in every file to work.
Diffstat (limited to 'tools/syz-declextract/testdata/include')
-rw-r--r--tools/syz-declextract/testdata/include/fs.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/syz-declextract/testdata/include/fs.h b/tools/syz-declextract/testdata/include/fs.h
index 33782d1ee..b4eba0bd7 100644
--- a/tools/syz-declextract/testdata/include/fs.h
+++ b/tools/syz-declextract/testdata/include/fs.h
@@ -11,7 +11,13 @@ struct file_operations {
void (*mmap)(void);
};
-int alloc_fd();
-void __fget_light(int fd);
-int from_kuid();
+static int alloc_fd() {
+ return 1;
+}
+static void __fget_light(int fd) {
+}
+
+static int from_kuid() {
+ return 1;
+}