selftest: detect older tshark version
authorUri Simchoni <uri@samba.org>
Mon, 5 Sep 2016 05:52:52 +0000 (08:52 +0300)
committerVolker Lendecke <vl@samba.org>
Mon, 5 Sep 2016 14:31:58 +0000 (16:31 +0200)
Detect older versions of tshark, which do not recognize
the -Y option, and skip the kerberos enc type tests

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  5 16:31:58 CEST 2016 on sn-devel-144

testprogs/blackbox/test_client_etypes.sh

index f424b52cd9fbd2d065978ac40326e880735df84e..57739c6e97e9d10960a7c3715b752ead4f0559ed 100755 (executable)
@@ -51,6 +51,18 @@ testit "testjoin" $VALGRIND $net_tool ads testjoin -kP || failed=`expr $failed +
 export SOCKET_WRAPPER_PCAP_FILE=
 testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1`
 
+#
+# Older versions of tshark do not support -Y option,
+# They use -R which cannot be used with recent versions...
+#
+if ! tshark -r $pcap_file  -nVY "kerberos" > /dev/null 2>&1 ; then
+    subunit_start_test "client encryption types"
+    subunit_skip_test "client encryption types" <<EOF
+Skipping tests - old version of tshark detected
+EOF
+    exit 0
+fi
+
 actual_types="`tshark -r $pcap_file  -nVY "kerberos" | \
        sed -rn -e 's/[[:space:]]*ENCTYPE:.*\(([^\)]*)\)$/\1/p' \
            -e 's/[[:space:]]*Encryption type:.*\(([^\)]*)\)$/\1/p' | \