Re: [Cocci] [RFC PATCH] scripts: coccicheck: Improve error feedback when coccicheck fails

2020-09-14 Thread Julia Lawall
On Mon, 14 Sep 2020, Markus Elfring wrote: > How do you think about to use the following check variant? > > +if [ "${DEBUG_FILE}" != '/dev/null' -a "${DEBUG_FILE}" != '' ]; > then > … > > I have no idea. Why can't they be nclosed by double quotes as well? > > Both s

Re: [Cocci] [RFC PATCH] scripts: coccicheck: Improve error feedback when coccicheck fails

2020-09-14 Thread Julia Lawall
On Mon, 14 Sep 2020, Markus Elfring wrote: > >> How do you think about to use the following check variant? > >> > >> + if [ "${DEBUG_FILE}" != '/dev/null' -a "${DEBUG_FILE}" != '' ]; then > > > > What difference does it make? > > I propose two implementation details for further development con

Re: [Cocci] [RFC PATCH] scripts: coccicheck: Improve error feedback when coccicheck fails

2020-09-13 Thread Julia Lawall
On Mon, 14 Sep 2020, Markus Elfring wrote: > … > > +++ b/scripts/coccicheck > > @@ -126,8 +126,14 @@ run_cmd_parmap() { > > if [ $VERBOSE -ne 0 ] ; then > > echo "Running ($NPROC in parallel): $@" > > fi > > - echo $@ >>$DEBUG_FILE > > - $@ 2>>$DEBUG_FILE > > + if [ "$D

Re: [Cocci] [RFC PATCH] scripts: coccicheck: Improve error feedback when coccicheck fails

2020-09-13 Thread Julia Lawall
On Sun, 13 Sep 2020, Sumera Priyadarsini wrote: > Currently, coccicheck fails with only the message "coccicheck failed" > and the error code for the failure. To obtain the error logs, > one needs to specify a debug file using the DEBUG_FILE option. > > Modify coccicheck to display error logs wh

[RFC PATCH] scripts: coccicheck: Improve error feedback when coccicheck fails

2020-09-13 Thread Sumera Priyadarsini
Currently, coccicheck fails with only the message "coccicheck failed" and the error code for the failure. To obtain the error logs, one needs to specify a debug file using the DEBUG_FILE option. Modify coccicheck to display error logs when it crashes unless DEBUG_FILE is set, in which case, the er