changeset 28337:869e65e68aee

tests: Solaris cmp complains about empty files, even with -s When you compare an empty file, such as /dev/null, with a non-empty file, Solaris cmp complains on stderr with "cmp: EOF on /dev/null", even if the -s argument is present. GNU cmp makes the complaint, but silences it with -s. We can change the pdiff utility to simply redirect stderr to /dev/null so that we don't have to worry about this difference in the test files.
author Danek Duvall <danek.duvall@oracle.com>
date Wed, 02 Mar 2016 14:58:29 -0800
parents a5a13eeffc59
children 9974b8236cac
files tests/pdiff
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/pdiff	Wed Mar 02 14:55:13 2016 -0800
+++ b/tests/pdiff	Wed Mar 02 14:58:29 2016 -0800
@@ -25,7 +25,7 @@
         file2=/dev/null
     fi
 
-    if cmp -s "$file1" "$file2"; then
+    if cmp -s "$file1" "$file2" 2> /dev/null; then
         # Return immediately, because comparison isn't needed. This
         # also avoids redundant message of diff like "No differences
         # encountered" (on Solaris)