ctdb-tests: Improve test portability
commit760c3039b0752204090b493132ad32bad4140064
authorMartin Schwenke <martin@meltin.net>
Thu, 5 Mar 2020 09:21:26 +0000 (5 20:21 +1100)
committerMartin Schwenke <martins@samba.org>
Wed, 22 Jul 2020 07:53:36 +0000 (22 07:53 +0000)
treed981477793020297ee94a31f8e21cbb11ed18554
parent41ff58338a0b36dfccc19579c8edfa5939cd5978
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces and
stops "$num from being a number.  Create a more portable solution and
put it in a function instead of repeating the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/INTEGRATION/failover/pubips.040.NoIPTakeover.sh