diff --git a/script.sh b/script.sh index e915aa5..011e095 100755 --- a/script.sh +++ b/script.sh @@ -171,6 +171,7 @@ parse_defs_C() # Parse function macros, e.g., in .S files perl -ne '/^\s*ENTRY\((\w+)\)/ and print "$1 function $.\n"' "$full_path" + perl -ne '/^SYSCALL_DEFINE[0-9]\(\s*(\w+)\W/ and print "sys_$1 function $.\n"' "$full_path" rm "$full_path" rmdir $tmp diff --git a/t/100-basic.t b/t/100-basic.t index 89582b0..39a22ff 100644 --- a/t/100-basic.t +++ b/t/100-basic.t @@ -122,6 +122,13 @@ run_produces_ok('ident query (ENTRY that should not be detected, #150)', ], MUST_SUCCEED); +run_produces_ok('ident query (existent, #228)', + [$query_py, qw(v5.4 ident sys_init_module C)], + [qr{^Symbol Definitions:}, qr{^Symbol References:}, + { def => qr{syscall_define\.c.+\b1\b.+\bfunction\b} } + ], + MUST_SUCCEED); + # Spot-check some files run_produces_ok('file query (nonexistent)', diff --git a/t/tree/syscall_define.c b/t/tree/syscall_define.c new file mode 100644 index 0000000..fab9388 --- /dev/null +++ b/t/tree/syscall_define.c @@ -0,0 +1,3 @@ +SYSCALL_DEFINE3(init_module) +{ +}