From 05051bd115726657615412a3bbdeb6f0ad7f0396 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 8 Mar 2016 13:37:42 +1100 Subject: [PATCH] ctdb-tests: Add a new NFS tickle test for the releasing node Current NFS and CIFS tickle tests do not test the killtcp functionality on the releasing node. 2-way killing is done for NFS, so this test explicitly looks for packets from the releasing node. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tests/complex/30_nfs_tickle_killtcp.sh | 69 +++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 ctdb/tests/complex/30_nfs_tickle_killtcp.sh diff --git a/ctdb/tests/complex/30_nfs_tickle_killtcp.sh b/ctdb/tests/complex/30_nfs_tickle_killtcp.sh new file mode 100755 index 00000000000..d1e7d714646 --- /dev/null +++ b/ctdb/tests/complex/30_nfs_tickle_killtcp.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +test_info() +{ + cat </dev/null 2>&1" + +wait_until_get_src_socket "tcp" "${test_ip}:${test_port}" $nc_pid "nc" +src_socket="$out" +echo "Source socket is $src_socket" + +echo "Getting MAC address associated with ${test_ip}..." +releasing_mac=$(ip neigh show $test_prefix | awk '$4 == "lladdr" {print $5}') +[ -n "$releasing_mac" ] || die "Couldn't get MAC address for ${test_prefix}" +echo "MAC address is: ${releasing_mac}" + +tcptickle_sniff_start $src_socket "${test_ip}:${test_port}" + +echo "Disabling node $test_node" +try_command_on_node 1 $CTDB disable -n $test_node +wait_until_node_has_status $test_node disabled + +# Only look for a reset from the releasing node +tcptickle_sniff_wait_show "$releasing_mac"