From: Luis Chamberlain Date: Tue, 14 May 2019 22:45:04 +0000 (-0700) Subject: tools/testing/selftests/sysctl/sysctl.sh: ignore diff output on verify_diff_w() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8ded3d1026b26240eaa285b98b7942d27f657355;p=openwrt%2Fstaging%2Fblogic.git tools/testing/selftests/sysctl/sysctl.sh: ignore diff output on verify_diff_w() 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. Link: http://lkml.kernel.org/r/20190320222831.8243-4-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: Kees Cook Cc: Eric Sandeen Cc: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 $? }