lkml.org 
[lkml]   [2017]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Coccinelle: make DEBUG_FILE option more useful
Hi Julia,


2017-10-15 18:55 GMT+09:00 Julia Lawall <Julia.Lawall@lip6.fr>:
> Make coccicheck checked for the existence of DEBUG_FILE on each semantic
> patch, and bailed if it already existed. This meant that DEBUG_FILE was
> useless for checking more than one semantic patch at a time. Now the check
> is moved to the start of make coccicheck, and the 2> is changed to a 2>> to
> append to the file on each semantic patch. Furthermore, the spatch command
> that is run for each semantic patch is also added to the DEBUG_FILE, to
> make clear what each stdout trace corresponds to.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>

I think this is a good improvement,
and looks almost good to me.

Just one nit.


>
> }
>
> +if [ "$DEBUG_FILE" != "/dev/null" -a "$DEBUG_FILE" != "" ]; then
> + if [ -f $DEBUG_FILE ]; then
> + echo "Debug file $DEBUG_FILE exists, bailing"
> + exit
> + fi
> + touch $DEBUG_FILE

I think this "touch" is redundant.

If the DEBUG_FILE does not exist, 2>> will automatically create it.




> +else
> + DEBUG_FILE="/dev/null"
> +fi
> +
> if [ "$COCCI" = "" ] ; then
> for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do
> coccinelle $f
>



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-10-26 03:51    [W:0.163 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site