lkml.org 
[lkml]   [2019]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/6] test_sysctl: ignore diff output on verify_diff_w()
Date
When verify_diff_w() is used we care about the result, not
the verbose output, and although we use -q, that still
gives us a chatty message about if the files differ or not.
Since verify_diff_w() uses stdinput the chatty message says
whether or not "-" matches the target file, and this just
seems rather odd. Better to just ignore that messsage all
together, what we really care about i sthe results, the
return value and we check for that.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
tools/testing/selftests/sysctl/sysctl.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh
index e0c8404da6b0..f51987d0d32d 100755
--- a/tools/testing/selftests/sysctl/sysctl.sh
+++ b/tools/testing/selftests/sysctl/sysctl.sh
@@ -179,7 +179,7 @@ verify()

verify_diff_w()
{
- echo "$TEST_STR" | diff -q -w -u - $1
+ echo "$TEST_STR" | diff -q -w -u - $1 > /dev/null
return $?
}

--
2.18.0
\
 
 \ /
  Last update: 2019-03-20 23:29    [W:0.184 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site