diff options
| -rwxr-xr-x | tools/testing/selftests/ftrace/ftracetest | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest index 316f2bf7099c..136387422b00 100755 --- a/tools/testing/selftests/ftrace/ftracetest +++ b/tools/testing/selftests/ftrace/ftracetest | |||
| @@ -154,13 +154,13 @@ fi | |||
| 154 | 154 | ||
| 155 | # Define text colors | 155 | # Define text colors |
| 156 | # Check available colors on the terminal, if any | 156 | # Check available colors on the terminal, if any |
| 157 | ncolors=`tput colors 2>/dev/null` | 157 | ncolors=`tput colors 2>/dev/null || echo 0` |
| 158 | color_reset= | 158 | color_reset= |
| 159 | color_red= | 159 | color_red= |
| 160 | color_green= | 160 | color_green= |
| 161 | color_blue= | 161 | color_blue= |
| 162 | # If stdout exists and number of colors is eight or more, use them | 162 | # If stdout exists and number of colors is eight or more, use them |
| 163 | if [ -t 1 -a "$ncolors" -a "$ncolors" -ge 8 ]; then | 163 | if [ -t 1 -a "$ncolors" -ge 8 ]; then |
| 164 | color_reset="\033[0m" | 164 | color_reset="\033[0m" |
| 165 | color_red="\033[31m" | 165 | color_red="\033[31m" |
| 166 | color_green="\033[32m" | 166 | color_green="\033[32m" |
