From 61f22b1eb2bd441bce998240701b0acd03265a47 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 3 Oct 2016 16:43:00 +0200 Subject: [PATCH] Fix test suite in combination with bash 4.4 Until bash 4.4, variables were silently stripped of NUL bytes; with Bash 4.4 this results now for every single 0-byte that is being stripped in a warning: ./test: line 170: warning: command substitution: ignored null byte in input We now simply strip the NUL bytes before we have bash assign the values to a variable. The result is the same. --- test/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: logrotate-3.9.1/test/test =================================================================== --- logrotate-3.9.1.orig/test/test +++ logrotate-3.9.1/test/test @@ -167,7 +167,7 @@ checkoutput() { if [ -n "$co_compressed" -a "$co_compressed" != 0 ]; then contents=`gunzip -c $file` else - contents=`cat $file` + contents=`cat $file | tr -d '\000'` fi if [ "$contents" != "$expected" ]; then echo "file $file does not contain expected results (compressed $co_compressed, args $*)" >&2