linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/futex: Check ANSI terminal color support
@ 2016-10-02  2:02 SeongJae Park
  2016-10-03 22:02 ` Darren Hart
  2016-10-10 23:15 ` SeongJae Park
  0 siblings, 2 replies; 4+ messages in thread
From: SeongJae Park @ 2016-10-02  2:02 UTC (permalink / raw)
  To: shuah, dvhart; +Cc: linux-kselftest, linux-kernel, SeongJae Park

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 <sj38.park@gmail.com>
---
 tools/testing/selftests/futex/functional/run.sh | 2 +-
 tools/testing/selftests/futex/run.sh            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests/futex: Check ANSI terminal color support
  2016-10-02  2:02 [PATCH] selftests/futex: Check ANSI terminal color support SeongJae Park
@ 2016-10-03 22:02 ` Darren Hart
  2016-10-10 23:15 ` SeongJae Park
  1 sibling, 0 replies; 4+ messages in thread
From: Darren Hart @ 2016-10-03 22:02 UTC (permalink / raw)
  To: SeongJae Park; +Cc: shuah, dvhart, linux-kselftest, linux-kernel

On Sun, Oct 02, 2016 at 11:02:18AM +0900, SeongJae Park wrote:
> 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 <sj38.park@gmail.com>

No objection. Terminfo slists these separately, and I don't see a way to handle
ANSI in a single command.

Acked-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  tools/testing/selftests/futex/functional/run.sh | 2 +-
>  tools/testing/selftests/futex/run.sh            | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> 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
> -- 
> 2.10.0
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests/futex: Check ANSI terminal color support
  2016-10-02  2:02 [PATCH] selftests/futex: Check ANSI terminal color support SeongJae Park
  2016-10-03 22:02 ` Darren Hart
@ 2016-10-10 23:15 ` SeongJae Park
  2016-10-11 13:26   ` Shuah Khan
  1 sibling, 1 reply; 4+ messages in thread
From: SeongJae Park @ 2016-10-10 23:15 UTC (permalink / raw)
  To: shuah, dvhart; +Cc: linux-kselftest, linux-kernel, SeongJae Park

Hi,


Shuah, may I ask your comment about this patch?


Thanks,
SeongJae Park

On Sun, Oct 2, 2016 at 11:02 AM, SeongJae Park <sj38.park@gmail.com> wrote:
> 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 <sj38.park@gmail.com>
> ---
>  tools/testing/selftests/futex/functional/run.sh | 2 +-
>  tools/testing/selftests/futex/run.sh            | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> 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
> --
> 2.10.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests/futex: Check ANSI terminal color support
  2016-10-10 23:15 ` SeongJae Park
@ 2016-10-11 13:26   ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2016-10-11 13:26 UTC (permalink / raw)
  To: SeongJae Park, dvhart; +Cc: linux-kselftest, linux-kernel, shuah Khan

On 10/10/2016 05:15 PM, SeongJae Park wrote:
> Hi,
> 
> 
> Shuah, may I ask your comment about this patch?
> 
> 

Looks good to me. I also see Daren's Ack. I will get this into 4.9-rc1.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-11 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-02  2:02 [PATCH] selftests/futex: Check ANSI terminal color support SeongJae Park
2016-10-03 22:02 ` Darren Hart
2016-10-10 23:15 ` SeongJae Park
2016-10-11 13:26   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).