From: SeongJae Park Date: Sun, 2 Oct 2016 02:02:18 +0000 (+0900) Subject: selftests/futex: Check ANSI terminal color support X-Git-Tag: v4.9-rc1~9^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fecf861e765b2f9ce1a0487c3940afaed80ef7a8;p=karo-tx-linux.git selftests/futex: Check ANSI terminal color support Because test for color support of the running shell does not aware ANSI type terminals, it does not print colorful messages on some environemnt. This commit modifies the test to aware ANSI type terminal, too. Signed-off-by: SeongJae Park Acked-by: Darren Hart Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh index e87dbe2a0b0d..7ff002eed624 100755 --- a/tools/testing/selftests/futex/functional/run.sh +++ b/tools/testing/selftests/futex/functional/run.sh @@ -24,7 +24,7 @@ # Test for a color capable console if [ -z "$USE_COLOR" ]; then - tput setf 7 + tput setf 7 || tput setaf 7 if [ $? -eq 0 ]; then USE_COLOR=1 tput sgr0 diff --git a/tools/testing/selftests/futex/run.sh b/tools/testing/selftests/futex/run.sh index 4126312ad64e..88bcb1767362 100755 --- a/tools/testing/selftests/futex/run.sh +++ b/tools/testing/selftests/futex/run.sh @@ -23,7 +23,7 @@ # Test for a color capable shell and pass the result to the subdir scripts USE_COLOR=0 -tput setf 7 +tput setf 7 || tput setaf 7 if [ $? -eq 0 ]; then USE_COLOR=1 tput sgr0