Commit 165f58a9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Test get-stats-description and get-stats.

parent 5d546d39
......@@ -435,12 +435,40 @@ simple_expect "%1133 17 0" "mark-as-unread"
send "1134 110 6 2 { 1 1 3 2 }\n"
simple_expect "%1134 55 1" "mark-as-unread"
# 111:does not exist (change this when you add a call)
# 111:get_stats_description
send "1135 111\n"
simple_expect "%1135 2 0"
simple_expect "=1135 9 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "req-rate"] [holl "dns-rate"] [holl "ident-rate"] [holl "run-queue-enter"] [holl "run-queue-leave"] } 6 { 0 1 15 60 300 900 }"
# 112:get_stats
# Rates, in the order they are listed in Protocol-A.texi.
send "1136 112 [holl "req-rate"]\n"
simple_expect "=1136 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1137 112 [holl "dns-rate"]\n"
simple_expect "=1137 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1138 112 [holl "ident-rate"]\n"
simple_expect "=1138 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1139 112 [holl "run-queue-enter"]\n"
simple_expect "=1139 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1140 112 [holl "run-queue-leave"]\n"
simple_expect "=1140 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
# Levels, in the order they are listed in Protocol-A.texi.
send "1141 112 [holl "run-queue-length"]\n"
simple_expect "=1141 6 { 0 $any_num $any_num $any_num $any_num $any_num }"
send "1142 112 [holl "pending-dns"]\n"
simple_expect "=1142 6 { 0 $any_num $any_num $any_num $any_num $any_num }"
send "1143 112 [holl "pending-ident"]\n"
simple_expect "=1143 6 { 0 $any_num $any_num $any_num $any_num $any_num }"
send "1144 112 [holl "clients"]\n"
simple_expect "=1144 6 { 100 $any_num $any_num $any_num $any_num $any_num }"
# Non-existing stuff.
send "1145 112 [holl "no-such-thing"]\n"
simple_expect "%1145 57 0"
# 113:does not exist (change this when you add a call)
send "1146 113\n"
simple_expect "%1146 2 0"
# finally, check that 55=disconnect actually works without logging in.
send "1136 55 1\n"
simple_expect "=1136" "disconnect (no login)"
send "1147 55 1\n"
simple_expect "=1147" "disconnect (no login)"
client_death 0
client_start 0
......@@ -449,32 +477,32 @@ send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"
# Turn of async messages
send "1137 80 0 { }\n"
simple_expect "=1137"
send "1148 80 0 { }\n"
simple_expect "=1148"
# Log in
send "1138 62 5 [holl "gazonk"] 0\n"
simple_expect "=1138"
send "1149 62 5 [holl "gazonk"] 0\n"
simple_expect "=1149"
send "1139 9 5 5\n"
simple_expect "=1139 $any_time 5 255 0 0 \\*"
send "1150 9 5 5\n"
simple_expect "=1150 $any_time 5 255 0 0 \\*"
send "1140 27 5 0 { }\n"
simple_expect "=1140"
send "1151 27 5 0 { }\n"
simple_expect "=1151"
send "1141 9 5 5\n"
simple_expect "=1141 $any_time 5 255 0 0 \\*"
send "1152 9 5 5\n"
simple_expect "=1152 $any_time 5 255 0 0 \\*"
send "1142 6 6 1\n"
simple_expect "=1142 [idholl "DejaGnu test suite.unknown."] 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1143 6 6 0\n"
simple_expect "=1143 0H 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1153 6 6 1\n"
simple_expect "=1153 [idholl "DejaGnu test suite.unknown."] 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1154 6 6 0\n"
simple_expect "=1154 0H 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
talk_to client 0
send "1144 42 255\n"
simple_expect "=1144" "42=enable succeeded"
send "1145 44 0\n"
simple_expect "=1145" "44=shutdown-kom succeeded"
send "1155 42 255\n"
simple_expect "=1155" "42=enable succeeded"
send "1156 44 0\n"
simple_expect "=1156" "44=shutdown-kom succeeded"
client_death 0
lyskomd_death
......@@ -1425,33 +1425,63 @@ simple_expect "=1380"
send "1381 108 6 0 100 1 0\n"
simple_expect "=1381 3 { 0 $any_time 10 123 0 \\* 8 $any_time 00000000 1 $any_time 6 255 0 \\* 6 $any_time 00000000 2 $any_time 7 100 2 { 1 4 6 6 } 6 $any_time 00000000 }"
talk_to client 1
# test call 111 (get_stats_description)
send "1382 111\n"
simple_expect "=1382 9 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "req-rate"] [holl "dns-rate"] [holl "ident-rate"] [holl "run-queue-enter"] [holl "run-queue-leave"] } 6 { 0 1 15 60 300 900 }"
# test call 112 (get_stats)
# Rates, in the order they are listed in Protocol-A.texi.
send "1383 112 [holl "req-rate"]\n"
simple_expect "=1383 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1384 112 [holl "dns-rate"]\n"
simple_expect "=1384 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1385 112 [holl "ident-rate"]\n"
simple_expect "=1385 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1386 112 [holl "run-queue-enter"]\n"
simple_expect "=1386 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
send "1387 112 [holl "run-queue-leave"]\n"
simple_expect "=1387 6 { $any_num $any_num $any_num $any_num $any_num $any_num }"
# Levels, in the order they are listed in Protocol-A.texi.
send "1388 112 [holl "run-queue-length"]\n"
simple_expect "=1388 6 { 0 $any_num $any_num $any_num $any_num $any_num }"
send "1389 112 [holl "pending-dns"]\n"
simple_expect "=1389 6 { 0 $any_num $any_num $any_num $any_num $any_num }"
send "1390 112 [holl "pending-ident"]\n"
simple_expect "=1390 6 { 0 $any_num $any_num $any_num $any_num $any_num }"
send "1391 112 [holl "clients"]\n"
simple_expect "=1391 6 { 300 $any_num $any_num $any_num $any_num $any_num }"
# Non-existing stuff.
send "1392 112 [holl "no-such-thing"]\n"
simple_expect "%1392 57 0"
# There is no call 111--yet.
send "1382 111 1 2 3 4 1 32 { 2 }\n"
simple_expect "%1382 2 0"
# There is no call 112--yet.
send "1383 112\n"
simple_expect "%1383 2 0"
talk_to client 1
# There is no call 113--yet.
send "1384 113\n"
simple_expect "%1384 2 0"
send "1393 113 1 2 3 4 1 32 { 2 }\n"
simple_expect "%1393 2 0"
# There is no call 114--yet.
send "1385 114\n"
simple_expect "%1385 2 0"
send "1394 114\n"
simple_expect "%1394 2 0"
# There is no call 115--yet.
send "1395 115\n"
simple_expect "%1395 2 0"
# There is no call 116--yet.
send "1396 116\n"
simple_expect "%1396 2 0"
# Disconnect all but the first session
talk_to client 2
send "1386 55 4\n"
simple_expect "=1386"
send "1397 55 4\n"
simple_expect "=1397"
client_death 2
talk_to client 1
send "1387 55 2\n"
simple_expect "=1387"
send "1398 55 2\n"
simple_expect "=1398"
simple_expect ":2 13 8 2"
client_death 1
......@@ -1459,20 +1489,20 @@ client_death 1
talk_to client 0
simple_expect ":2 13 8 2"
send "1388 62 5 [holl "bar"] 0\n"
send "1399 62 5 [holl "bar"] 0\n"
simple_expect ":2 13 6 1"
simple_expect ":2 9 5 1"
simple_expect "=1388"
simple_expect "=1399"
send "1389 42 255\n"
simple_expect "=1389" "42=enable succeeded"
send "1390 43\n"
send "1400 42 255\n"
simple_expect "=1400" "42=enable succeeded"
send "1401 43\n"
simple_expect ":0 7"
simple_expect ":0 7"
simple_expect "=1390"
simple_expect "=1401"
talk_to client 0
send "1391 44 0\n"
simple_expect "=1391" "44=shutdown-kom succeeded"
send "1402 44 0\n"
simple_expect "=1402" "44=shutdown-kom succeeded"
client_death 0
lyskomd_death
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment