Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts: coccicheck: Improve error feedback when coccicheck fails

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 error logs are stored in
the specified debug file.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

authored by

Sumera Priyadarsini and committed by
Julia Lawall
a19d1358 6519a5ab

+8 -2
+8 -2
scripts/coccicheck
··· 126 126 if [ $VERBOSE -ne 0 ] ; then 127 127 echo "Running ($NPROC in parallel): $@" 128 128 fi 129 - echo $@ >>$DEBUG_FILE 130 - $@ 2>>$DEBUG_FILE 129 + if [ "$DEBUG_FILE" != "/dev/null" -a "$DEBUG_FILE" != "" ]; then 130 + echo $@>>$DEBUG_FILE 131 + $@ 2>>$DEBUG_FILE 132 + else 133 + echo $@ 134 + $@ 2>&1 135 + fi 136 + 131 137 err=$? 132 138 if [[ $err -ne 0 ]]; then 133 139 echo "coccicheck failed"