+ cecho-n "test.."
+ echo -e "\nTEST\n" >> $CONSOLE_LOG 2>&1
+
+ STATUS="passed"
+
+ eval `awk -F "::" '{
+ host=$1
+ command=$2
+ pattern=$3
+ hit=$4
+ if (command != "")
+ {
+ if (command == "tcpdump")
+ {
+ printf("if [ \044TDUP_%s == \"true\" ]; then stop_tcpdump %s; fi; \n", host, host)
+ printf("echo \"%s# cat /tmp/tcpdump.log | grep \047%s\047 [%s]\"; ", host, pattern, hit)
+ printf("ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\"; ", host, pattern)
+ }
+ else if (command == "tcpdumpcount")
+ {
+ printf("if [ \044TDUP_%s == \"true\" ]; then stop_tcpdump %s; fi; \n", host, host)
+ printf("echo -e \"%s# [ \\\\140cat /tmp/tcpdump.log | grep \047%s\047 | tee -a /dev/stderr | wc -l\\\\140 -eq %s ] [YES]\"; ", host, pattern, hit)
+ printf("tcpdumpcount=\`ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\" | tee -a /dev/stderr | wc -l\`; ", host, pattern)
+ printf("[ \044tcpdumpcount -eq %s ]; ", hit)
+ hit="YES"
+ }
+ else if (command == "cmd")
+ {
+ printf("echo \"%s# %s [%s]\"; ", host, pattern, hit)
+ printf("ssh root@\044ipv4_%s %s; ", host, pattern)
+ }
+ else
+ {
+ printf("echo \"%s# %s | grep \047%s\047 [%s]\"; ", host, command, pattern, hit)
+ printf("ssh root@\044ipv4_%s %s | grep \"%s\"; ", host, command, pattern)
+ }
+ printf("cmd_exit=\044?; ")
+ printf("echo; ")
+ printf("if [ \044cmd_exit -eq 0 -a \"%s\" = \"NO\" ] ", hit)
+ printf("|| [ \044cmd_exit -ne 0 -a \"%s\" = \"YES\" ] ", hit)
+ printf("; then STATUS=\"failed\"; fi; \n")
+ }
+ }' $TESTDIR/evaltest.dat` >> $CONSOLE_LOG 2>&1
+
+
+ ##########################################################################
+ # set counters
+ #
+
+ if [ $STATUS = "failed" ]
+ then
+ let "failed_cnt += 1"
+ else
+ let "passed_cnt += 1"
+ fi