ctdb-tests: Make try_command_on_node less error-prone
commit9d02452a24625df5f62fd6d45a16effe2fa45fbe
authorMartin Schwenke <martin@meltin.net>
Thu, 28 Mar 2019 03:26:52 +0000 (28 14:26 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 7 May 2019 05:45:34 +0000 (7 05:45 +0000)
tree87d3269a3d85ffe17aae046fb9eb548c2c13348b
parent7c3819d1ac264acf998f426e0cef7f6211e0ddee
ctdb-tests: Make try_command_on_node less error-prone

This sometimes fails, apparently due to a cat process in onnode
getting EAGAIN.  The conclusion is that tests that process large
amounts of output should not depend on a sub-shell delivering that
output into a shell variable.

Change try_command_on_node() to leave all of the output in file
$outfile and just put the first 1KB into $out.  $outfile is removed
after each test completes.

Change the implementation of sanity_check_output() to use $outfile
instead of $out.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/scripts/integration.bash