[LTP] [PATCH v4 1/3] Add Coccinelle helper scripts for reference

Li Wang liwang@redhat.com
Wed Jun 16 09:48:38 CEST 2021


Li Wang <liwang@redhat.com> wrote:

> > +for spatch_file in $*; do
> > +    case $spatch_file in
> > +       libltp-test-macro)
> > +           libltp_spatch --sp-file scripts/coccinelle/libltp-test-macro.cocci;;
> > +       libltp-test-macro-vars)
> > +           libltp_spatch --sp-file scripts/coccinelle/libltp-test-macro-vars.cocci \
> > +                         --ignore lib/tst_test.c;;
> > +       *)
> > +           tests_spatch --sp-file scripts/coccinelle/$spatch_file.cocci;;
>
> Why here use the coccinelle/ path and add suffix with the spatch_file?

Ah, it seems to preserve for more self define spatch files, I misread
the usage just now.
Sorry for making noise, I'm definitely a newbie on coccinelle.

-- 
Regards,
Li Wang



More information about the ltp mailing list