Commit 585d37fd authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Test send-queue-bytes and recv-queue-bytes.

parent 2043e3f2
......@@ -437,7 +437,7 @@ simple_expect "%1134 55 1" "mark-as-unread"
# 111:get_stats_description
send "1135 111\n"
simple_expect "=1135 6 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "reqs"] [holl "texts"] } 6 { 0 1 15 60 300 900 }"
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
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 }"
......@@ -451,16 +451,20 @@ 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 }"
# Non-existing stuff.
send "1142 112 [holl "no-such-thing"]\n"
simple_expect "%1142 57 0"
send "1144 112 [holl "no-such-thing"]\n"
simple_expect "%1144 57 0"
# 113:does not exist (change this when you add a call)
send "1143 113\n"
simple_expect "%1143 2 0"
send "1145 113\n"
simple_expect "%1145 2 0"
# finally, check that 55=disconnect actually works without logging in.
send "1144 55 1\n"
simple_expect "=1144" "disconnect (no login)"
send "1146 55 1\n"
simple_expect "=1146" "disconnect (no login)"
client_death 0
client_start 0
......@@ -469,32 +473,32 @@ send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"
# Turn of async messages
send "1145 80 0 { }\n"
simple_expect "=1145"
send "1147 80 0 { }\n"
simple_expect "=1147"
# Log in
send "1146 62 5 [holl "gazonk"] 0\n"
simple_expect "=1146"
send "1147 9 5 5\n"
simple_expect "=1147 $any_time 5 255 0 0 \\*"
send "1148 27 5 0 { }\n"
send "1148 62 5 [holl "gazonk"] 0\n"
simple_expect "=1148"
send "1149 9 5 5\n"
simple_expect "=1149 $any_time 5 255 0 0 \\*"
send "1150 6 6 1\n"
simple_expect "=1150 [idholl "DejaGnu test suite.unknown."] 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1151 6 6 0\n"
simple_expect "=1151 0H 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1150 27 5 0 { }\n"
simple_expect "=1150"
send "1151 9 5 5\n"
simple_expect "=1151 $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"
talk_to client 0
send "1152 42 255\n"
simple_expect "=1152" "42=enable succeeded"
send "1153 44 0\n"
simple_expect "=1153" "44=shutdown-kom succeeded"
send "1154 42 255\n"
simple_expect "=1154" "42=enable succeeded"
send "1155 44 0\n"
simple_expect "=1155" "44=shutdown-kom succeeded"
client_death 0
lyskomd_death
......@@ -1427,7 +1427,7 @@ simple_expect "=1381 3 { 0 $any_time 10 123 0 \\* 8 $any_time 00000000 1 $any_ti
# test call 111 (get_stats_description)
send "1382 111\n"
simple_expect "=1382 6 { [holl "run-queue-length"] [holl "pending-dns"] [holl "pending-ident"] [holl "clients"] [holl "reqs"] [holl "texts"] } 6 { 0 1 15 60 300 900 }"
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 }"
# test call 112 (get_stats)
send "1383 112 [holl "run-queue-length"]\n"
......@@ -1440,40 +1440,44 @@ send "1386 112 [holl "clients"]\n"
simple_expect "=1386 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 "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 "1387 112 [holl "texts"]\n"
simple_expect "=1387 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 "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 }"
# Non-existing stuff.
send "1388 112 [holl "no-such-thing"]\n"
simple_expect "%1388 57 0"
send "1391 112 [holl "no-such-thing"]\n"
simple_expect "%1391 57 0"
talk_to client 1
# There is no call 113--yet.
send "1389 113 1 2 3 4 1 32 { 2 }\n"
simple_expect "%1389 2 0"
send "1392 113 1 2 3 4 1 32 { 2 }\n"
simple_expect "%1392 2 0"
# There is no call 114--yet.
send "1390 114\n"
simple_expect "%1390 2 0"
send "1393 114\n"
simple_expect "%1393 2 0"
# There is no call 115--yet.
send "1391 115\n"
simple_expect "%1391 2 0"
send "1394 115\n"
simple_expect "%1394 2 0"
# There is no call 116--yet.
send "1392 116\n"
simple_expect "%1392 2 0"
send "1395 116\n"
simple_expect "%1395 2 0"
# Disconnect all but the first session
talk_to client 2
send "1393 55 4\n"
simple_expect "=1393"
send "1396 55 4\n"
simple_expect "=1396"
client_death 2
talk_to client 1
send "1394 55 2\n"
simple_expect "=1394"
send "1397 55 2\n"
simple_expect "=1397"
simple_expect ":2 13 8 2"
client_death 1
......@@ -1481,20 +1485,20 @@ client_death 1
talk_to client 0
simple_expect ":2 13 8 2"
send "1395 62 5 [holl "bar"] 0\n"
send "1398 62 5 [holl "bar"] 0\n"
simple_expect ":2 13 6 1"
simple_expect ":2 9 5 1"
simple_expect "=1395"
simple_expect "=1398"
send "1396 42 255\n"
simple_expect "=1396" "42=enable succeeded"
send "1397 43\n"
send "1399 42 255\n"
simple_expect "=1399" "42=enable succeeded"
send "1400 43\n"
simple_expect ":0 7"
simple_expect ":0 7"
simple_expect "=1397"
simple_expect "=1400"
talk_to client 0
send "1398 44 0\n"
simple_expect "=1398" "44=shutdown-kom succeeded"
send "1401 44 0\n"
simple_expect "=1401" "44=shutdown-kom succeeded"
client_death 0
lyskomd_death
......@@ -96,5 +96,17 @@ simple_expect "$reqs pending reqs"
simple_expect ""
get_time_client_death 4
client_start 0
talk_to client 0
send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"
send "1000 112 [holl "send-queue-bytes"]\n"
simple_expect "=1000 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 "1001 112 [holl "recv-queue-bytes"]\n"
simple_expect "=1001 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 }"
system "kill -HUP $lyskomd_pid"
client_death 0
lyskomd_death "" signal
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