Hello,

I have tried another script out for the evolving semantic patch language.
Source code information is imported into a database table based on
the following SmPL rule.


@searching@
identifier work;
statement s1, s2;
position pos;
type T;
@@
 T work(...)
 {
 ... when any
 if (...)
 {
 ... when any
 s1@pos
 s2
 }
 ... when any
 }



I reduced the original source file to a test file which contains almost
only the most interesting code for this analysis approach.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/ti/netcp_ethss.c?id=75eac7b5f68b0a0671e795ac636457ee27cc11d8

I get an expected test result then.

elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch 
../janitor/list_duplicate_statement_pairs_from_if_branches3.cocci 
netcp_ethss-excerpt3.c
…
Using SQLAlchemy version:
1.3.2
…
statement1|statement2|"function name"|"source file"|incidence
of_node_put ( interfaces ) ;|return ret ;|gbe_probe|netcp_ethss-excerpt3.c|2


I reduced the original source file also to a test file which contains
the complete implementation of the function “gbe_probe”.
I get another unexpected test result then.


elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch 
../janitor/list_duplicate_statement_pairs_from_if_branches3.cocci 
netcp_ethss-excerpt5.c
…
Note: processing took    95.8s: netcp_ethss-excerpt5.c
Duplicate statements were not determined from 1 records.
statement1|statement2|"function name"|"source file"|line
dev_err ( dev , "device tree info unavailable\n" ) ;|return - ENODEV 
;|gbe_probe|netcp_ethss-excerpt5.c|12


Now I wonder about this software behaviour.
How are the chances to clarify the shown situation further?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to