From: Martin Schwenke Date: Thu, 5 Mar 2020 10:48:59 +0000 (+1100) Subject: ctdb-tests: Improve test portability X-Git-Tag: talloc-2.3.2~1006 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6c81ea287924c2924aebc6dc0cdea1dc4322ae2;p=thirdparty%2Fsamba.git ctdb-tests: Improve test portability "wc -l" on some platforms (e.g. FreeBSD) contains leading spaces, so strip them. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh b/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh index 58633af973d..03cf4317a39 100755 --- a/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh +++ b/ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh @@ -18,7 +18,7 @@ if [ -z "$out" ] ; then exit 0 fi -n=$(sort -u "$outfile" | wc -l) +n=$(sort -u "$outfile" | wc -l | tr -d '[:space:]') if [ "$n" = 1 ] ; then echo "GOOD: All nodes have the same recovery lock setting" else