From: Martin Schwenke Date: Wed, 4 Mar 2020 03:38:15 +0000 (+1100) Subject: ctdb-tests: Use built-in hexdump() in system socket tests X-Git-Tag: ldb-2.2.0~1464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f9dcfb6c3270a21f2a805b2aa308c5b584813e5;p=thirdparty%2Fsamba.git ctdb-tests: Use built-in hexdump() in system socket tests Better compatibility, since od output isn't consistent on FreeBSD. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Mar 10 09:17:12 UTC 2020 on sn-devel-184 --- diff --git a/ctdb/tests/UNIT/cunit/system_socket_test_002.sh b/ctdb/tests/UNIT/cunit/system_socket_test_002.sh index e22f2484b08..8bea074bd8d 100755 --- a/ctdb/tests/UNIT/cunit/system_socket_test_002.sh +++ b/ctdb/tests/UNIT/cunit/system_socket_test_002.sh @@ -2,29 +2,9 @@ . "${TEST_SCRIPTS_DIR}/unit.sh" -out_file="${CTDB_TEST_TMP_DIR}/packet.out" - -remove_file () -{ - rm -f "$out_file" -} - -test_cleanup remove_file - -d=$(dirname "$out_file") -mkdir -p "$d" - -######################################## - -tcp_run () -{ - $VALGRIND system_socket_test tcp "$@" >"$out_file" || exit $? - od -A x -t x1 "$out_file" -} - tcp_test () { - unit_test_notrace tcp_run "$@" + unit_test system_socket_test tcp "$@" } ok <"$out_file" || exit $? - od -A x -t x1 "$out_file" -} +ctdb_test_check_supported_OS "Linux" arp_test () { - os=$(uname) - if [ "$os" = "Linux" ] ; then - unit_test_notrace arp_run "$@" - else - ok "PACKETSOCKET not supported" - unit_test system_socket_test arp "$@" - fi + unit_test system_socket_test arp "$@" } ok <ether_type)) { case ETHERTYPE_IP: