Commit 420c796f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Test STAT_CONFS, STAT_PERSONS and get-boottime-info.

parent 2e55313c
......@@ -435,10 +435,10 @@ 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:get_stats_description
# 111:get-stats-description
send "1135 111\n"
simple_expect "=1135 8 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "reqs"] [holl "texts"] [holl "send-queue-bytes"] [holl "recv-queue-bytes"] } 6 { 0 1 15 60 300 900 }"
# 112:get_stats
simple_expect "=1135 10 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "reqs"] [holl "texts"] [holl "confs"] [holl "persons"] [holl "send-queue-bytes"] [holl "recv-queue-bytes"] } 6 { 0 1 15 60 300 900 }"
# 112:get-stats
send "1136 112 [holl "run-queue-length"]\n"
simple_expect "=1136 6 { 0 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1137 112 [holl "pending-dns"]\n"
......@@ -451,20 +451,28 @@ send "1140 112 [holl "reqs"]\n"
simple_expect "=1140 6 { 1 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1141 112 [holl "texts"]\n"
simple_expect "=1141 6 { 0 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1142 112 [holl "send-queue-bytes"]\n"
simple_expect "=1142 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1143 112 [holl "recv-queue-bytes"]\n"
simple_expect "=1143 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1142 112 [holl "confs"]\n"
simple_expect "=1142 6 { 7 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1143 112 [holl "persons"]\n"
simple_expect "=1143 6 { 3 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1144 112 [holl "send-queue-bytes"]\n"
simple_expect "=1144 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1145 112 [holl "recv-queue-bytes"]\n"
simple_expect "=1145 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
# Non-existing stuff.
send "1144 112 [holl "no-such-thing"]\n"
simple_expect "%1144 57 0"
send "1146 112 [holl "no-such-thing"]\n"
simple_expect "%1146 57 0"
# 113:does not exist (change this when you add a call)
send "1145 113\n"
simple_expect "%1145 2 0"
# 113:get-boottime-info
send "1147 113\n"
simple_expect "=1147 $any_time $any_time [holl "clean"] 0 0 5 1 5"
# 114:does not exist (change this when you add a call)
send "1148 114\n"
simple_expect "%1148 2 0"
# finally, check that 55=disconnect actually works without logging in.
send "1146 55 1\n"
simple_expect "=1146" "disconnect (no login)"
send "1149 55 1\n"
simple_expect "=1149" "disconnect (no login)"
client_death 0
client_start 0
......@@ -473,32 +481,32 @@ send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"
# Turn of async messages
send "1147 80 0 { }\n"
simple_expect "=1147"
send "1150 80 0 { }\n"
simple_expect "=1150"
# Log in
send "1148 62 5 [holl "gazonk"] 0\n"
simple_expect "=1148"
send "1151 62 5 [holl "gazonk"] 0\n"
simple_expect "=1151"
send "1149 9 5 5\n"
simple_expect "=1149 $any_time 5 255 0 0 \\*"
send "1152 9 5 5\n"
simple_expect "=1152 $any_time 5 255 0 0 \\*"
send "1150 27 5 0 { }\n"
simple_expect "=1150"
send "1153 27 5 0 { }\n"
simple_expect "=1153"
send "1151 9 5 5\n"
simple_expect "=1151 $any_time 5 255 0 0 \\*"
send "1154 9 5 5\n"
simple_expect "=1154 $any_time 5 255 0 0 \\*"
send "1152 6 6 1\n"
simple_expect "=1152 [idholl "DejaGnu test suite.unknown."] 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1153 6 6 0\n"
simple_expect "=1153 0H 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1155 6 6 1\n"
simple_expect "=1155 [idholl "DejaGnu test suite.unknown."] 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1156 6 6 0\n"
simple_expect "=1156 0H 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
talk_to client 0
send "1154 42 255\n"
simple_expect "=1154" "42=enable succeeded"
send "1155 44 0\n"
simple_expect "=1155" "44=shutdown-kom succeeded"
send "1157 42 255\n"
simple_expect "=1157" "42=enable succeeded"
send "1158 44 0\n"
simple_expect "=1158" "44=shutdown-kom succeeded"
client_death 0
lyskomd_death
......@@ -1425,11 +1425,11 @@ 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 }"
# test call 111 (get_stats_description)
# test call 111 (get-stats-description)
send "1382 111\n"
simple_expect "=1382 8 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "reqs"] [holl "texts"] [holl "send-queue-bytes"] [holl "recv-queue-bytes"] } 6 { 0 1 15 60 300 900 }"
simple_expect "=1382 10 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "reqs"] [holl "texts"] [holl "confs"] [holl "persons"] [holl "send-queue-bytes"] [holl "recv-queue-bytes"] } 6 { 0 1 15 60 300 900 }"
# test call 112 (get_stats)
# test call 112 (get-stats)
send "1383 112 [holl "run-queue-length"]\n"
simple_expect "=1383 6 { 0 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1384 112 [holl "pending-dns"]\n"
......@@ -1442,42 +1442,50 @@ send "1387 112 [holl "reqs"]\n"
simple_expect "=1387 6 { 1 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1388 112 [holl "texts"]\n"
simple_expect "=1388 6 { 9 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1389 112 [holl "send-queue-bytes"]\n"
simple_expect "=1389 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1390 112 [holl "recv-queue-bytes"]\n"
simple_expect "=1390 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1389 112 [holl "confs"]\n"
simple_expect "=1389 6 { 11 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1390 112 [holl "persons"]\n"
simple_expect "=1390 6 { 4 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1391 112 [holl "send-queue-bytes"]\n"
simple_expect "=1391 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
send "1392 112 [holl "recv-queue-bytes"]\n"
simple_expect "=1392 6 { $any_num 0 0 $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float $any_float }"
# Non-existing stuff.
send "1391 112 [holl "no-such-thing"]\n"
simple_expect "%1391 57 0"
send "1393 112 [holl "no-such-thing"]\n"
simple_expect "%1393 57 0"
talk_to client 1
# There is no call 113--yet.
send "1392 113 1 2 3 4 1 32 { 2 }\n"
simple_expect "%1392 2 0"
# test call 113 (get-boottime-info)
send "1394 113\n"
simple_expect "=1394 $any_time $any_time [holl "clean"] 0 0 5 1 5"
# There is no call 114--yet.
send "1393 114\n"
simple_expect "%1393 2 0"
send "1395 114 1 2 3 4 1 32 { 2 }\n"
simple_expect "%1395 2 0"
# There is no call 115--yet.
send "1394 115\n"
simple_expect "%1394 2 0"
send "1396 115\n"
simple_expect "%1396 2 0"
# There is no call 116--yet.
send "1395 116\n"
simple_expect "%1395 2 0"
send "1397 116\n"
simple_expect "%1397 2 0"
# There is no call 117--yet.
send "1398 117\n"
simple_expect "%1398 2 0"
# Disconnect all but the first session
talk_to client 2
send "1396 55 4\n"
simple_expect "=1396"
send "1399 55 4\n"
simple_expect "=1399"
client_death 2
talk_to client 1
send "1397 55 2\n"
simple_expect "=1397"
send "1400 55 2\n"
simple_expect "=1400"
simple_expect ":2 13 8 2"
client_death 1
......@@ -1485,20 +1493,20 @@ client_death 1
talk_to client 0
simple_expect ":2 13 8 2"
send "1398 62 5 [holl "bar"] 0\n"
send "1401 62 5 [holl "bar"] 0\n"
simple_expect ":2 13 6 1"
simple_expect ":2 9 5 1"
simple_expect "=1398"
simple_expect "=1401"
send "1399 42 255\n"
simple_expect "=1399" "42=enable succeeded"
send "1400 43\n"
send "1402 42 255\n"
simple_expect "=1402" "42=enable succeeded"
send "1403 43\n"
simple_expect ":0 7"
simple_expect ":0 7"
simple_expect "=1400"
simple_expect "=1403"
talk_to client 0
send "1401 44 0\n"
simple_expect "=1401" "44=shutdown-kom succeeded"
send "1404 44 0\n"
simple_expect "=1404" "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