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.
--- 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)