Skip to content
Snippets Groups Projects
Commit 8c2802e0 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

This test now causes lyskomd to dump core while garbing texts.

parent 4643b8d1
No related branches found
No related tags found
No related merge requests found
......@@ -254,22 +254,22 @@ simple_expect "=1020"
set tno 6
send "1021 86 [holl "text 5"] 2 { 0 7 0 9 } 2 { 20000 00100000 1 [holl "priv"] 20001 00000000 1 [holl "pub"] }\n"
extracting_expect ":16 0 $tno ($any_time) 6 0 6 0 4 { 0 7 6 6 0 9 6 2 }" time_5 1
simple_expect ":18 15 $tno $time_5 6 0 6 0 4 { 0 7 6 6 0 9 6 2 } 2 { 1 20000 6 $time_5 00100000 1 [holl "priv"] 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
extracting_expect ":16 0 $tno ($any_time) 6 0 6 0 4 { 0 7 6 6 0 9 6 2 }" time_6 1
simple_expect ":18 15 $tno $time_6 6 0 6 0 4 { 0 7 6 6 0 9 6 2 } 2 { 1 20000 6 $time_6 00100000 1 [holl "priv"] 2 20001 6 $time_6 00000000 1 [holl "pub"] }"
talk_to client 0
# FIXME: the secret information is filtered away even though it
# shouldn't be.
#simple_expect ":16 0 $tno $time_5 6 0 6 0 4 { 0 7 6 6 0 9 6 2 }"
#simple_expect ":18 15 $tno $time_5 6 0 6 0 4 { 0 7 6 6 0 9 6 2 } 2 { 1 20000 5 $time_5 00100000 1 [holl "priv"] 2 20001 5 $time_5 00000000 1 [holl "pub"] }"
simple_expect ":16 0 $tno $time_5 6 0 6 0 2 { 0 7 6 6 }"
simple_expect ":18 15 $tno $time_5 6 0 6 0 2 { 0 7 6 6 } 1 { 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
#simple_expect ":16 0 $tno $time_6 6 0 6 0 4 { 0 7 6 6 0 9 6 2 }"
#simple_expect ":18 15 $tno $time_6 6 0 6 0 4 { 0 7 6 6 0 9 6 2 } 2 { 1 20000 5 $time_6 00100000 1 [holl "priv"] 2 20001 5 $time_6 00000000 1 [holl "pub"] }"
simple_expect ":16 0 $tno $time_6 6 0 6 0 2 { 0 7 6 6 }"
simple_expect ":18 15 $tno $time_6 6 0 6 0 2 { 0 7 6 6 } 1 { 2 20001 6 $time_6 00000000 1 [holl "pub"] }"
setup_xfail "*"
fail "text 5: secret info not filtered for the admin"
talk_to client 1
simple_expect ":16 0 $tno $time_5 6 0 6 0 2 { 0 7 6 6 }"
simple_expect ":18 15 $tno $time_5 6 0 6 0 2 { 0 7 6 6 } 1 { 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
simple_expect ":16 0 $tno $time_6 6 0 6 0 2 { 0 7 6 6 }"
simple_expect ":18 15 $tno $time_6 6 0 6 0 2 { 0 7 6 6 } 1 { 2 20001 6 $time_6 00000000 1 [holl "pub"] }"
talk_to client 2
simple_expect "=1021 $tno"
......@@ -294,6 +294,8 @@ talk_to client 2
send "1026 35\n"
simple_expect "=1026 $any_time"
} else {
unsupported "testing the garb -- use configure --with-debug-calls to enable"
}
# Delete text 1
......@@ -332,38 +334,157 @@ talk_to client 0
simple_expect "=1027"
# Delete text 3
talk_to client 1
send "1028 29 3\n"
simple_expect ":18 14 3 $time_3 5 0 6 0 6 { 0 7 6 3 0 8 6 3 15 6 6 3 } 2 { 1 20000 5 $time_3 00100000 1 [holl "priv"] 2 20001 5 $time_3 00000000 1 [holl "pub"] }"
# Run the garb once.
simple_expect ":3 17 3 7 0"
simple_expect ":3 17 3 8 0"
setup_xfail "*"
fail "Text 3: client 1: async-sub-recipient sent after async-deleted-text"
talk_to client 0
simple_expect ":18 14 3 $time_3 5 0 6 0 6 { 0 7 6 3 0 8 6 3 15 6 6 3 } 2 { 1 20000 5 $time_3 00100000 1 [holl "priv"] 2 20001 5 $time_3 00000000 1 [holl "pub"] }"
simple_expect ":3 17 3 7 0"
simple_expect ":3 17 3 8 0"
setup_xfail "*"
fail "Text 3: client 0: async-sub-recipient sent after async-deleted-text"
talk_to client 2
simple_expect ":18 14 3 $time_3 5 0 6 0 4 { 0 7 6 3 15 6 6 3 } 1 { 2 20001 5 $time_3 00000000 1 [holl "pub"] }"
simple_expect ":3 17 3 7 0"
simple_expect ":3 17 3 8 0"
simple_expect ":3 17 3 6 15"
setup_xfail "*"
fail "Text 3: client 2: async-sub-recipient sent after async-deleted-text"
talk_to client 1
simple_expect "=1028"
# Delete text 5
talk_to client 2
send "1029 29 5\n"
simple_expect ":18 14 5 $time_5 6 0 6 0 4 { 0 7 6 5 0 9 6 1 } 2 { 1 20000 6 $time_5 00100000 1 [holl "priv"] 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
simple_expect ":3 17 5 7 0"
simple_expect ":3 17 5 9 0"
setup_xfail "*"
fail "Text 5: client 2: async-sub-recipient sent after async-deleted-text"
talk_to client 0
setup_xfail "*"
fail "text 5; client 0; censored too much"
simple_expect ":18 14 5 $time_5 6 0 6 0 2 { 0 7 6 5 } 1 { 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
# FIXME: this is the proper data. We are enabled and have privileges.
# simple_expect ":18 14 5 $time_5 6 0 6 0 4 { 0 7 6 5 0 9 6 1 } 2 { 1 20000 6 $time_5 00100000 1 [holl "priv"] 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
simple_expect ":3 17 5 7 0"
setup_xfail "*"
fail "Text 5: client 0: async-sub-recipient sent after async-deleted-text"
talk_to client 1
simple_expect ":18 14 5 $time_5 6 0 6 0 2 { 0 7 6 5 } 1 { 2 20001 6 $time_5 00000000 1 [holl "pub"] }"
simple_expect ":3 17 5 7 0"
setup_xfail "*"
fail "Text 5: client 1: async-sub-recipient sent after async-deleted-text"
talk_to client 2
simple_expect "=1029"
if {$debug_calls} {
# Run the garb. Nothing is deleted.
talk_to client 0
send "1028 1003\n"
simple_expect "=1028"
send "1030 1003\n"
simple_expect "=1030"
simple_expect ":1 1000 0"
# check that no async messages were produced
send "1029 35\n"
simple_expect "=1029 $any_time"
talk_to client 1
send "1030 35\n"
simple_expect "=1030 $any_time"
talk_to client 2
send "1031 35\n"
simple_expect "=1031 $any_time"
talk_to client 1
send "1032 35\n"
simple_expect "=1032 $any_time"
talk_to client 2
send "1033 35\n"
simple_expect "=1033 $any_time"
# Backdate texts 76 days.
talk_to client 0
send "1034 1002 2 [expr {76 * 24 * 3600}]\n"
simple_expect "=1034"
send "1035 1002 4 [expr {76 * 24 * 3600}]\n"
simple_expect "=1035"
send "1036 1002 6 [expr {76 * 24 * 3600}]\n"
simple_expect "=1036"
# Run the garb again. Nothing is deleted.
talk_to client 0
send "1037 1003\n"
simple_expect "=1037"
simple_expect ":1 1000 0"
# check that no async messages were produced
send "1038 35\n"
simple_expect "=1038 $any_time"
talk_to client 1
send "1039 35\n"
simple_expect "=1039 $any_time"
talk_to client 2
send "1040 35\n"
simple_expect "=1040 $any_time"
# Backdate texts 2 more days.
talk_to client 0
send "1041 1002 2 [expr {2 * 24 * 3600}]\n"
simple_expect "=1041"
send "1042 1002 4 [expr {2 * 24 * 3600}]\n"
simple_expect "=1042"
send "1043 1002 6 [expr {2 * 24 * 3600}]\n"
simple_expect "=1043"
# Run the garb -- all three texts should be removed
talk_to client 0
send "1044 1003\n"
simple_expect "=1044"
# FIXME: async for deletion of text 2
# FIXME: async for deletion of text 4
# FIXME: async for deletion of text 6
# Garb ends.
simple_expect ":1 1000 3"
# check that no other async messages were produced
send "1045 35\n"
simple_expect "=1045 $any_time"
talk_to client 1
send "1046 35\n"
simple_expect "=1046 $any_time"
talk_to client 2
send "1047 35\n"
simple_expect "=1047 $any_time"
}
# FIXME: backdate texts 76 days.
# FIXME: run the garb -- nothing should happen
# FIXME: backdate texts 2 days.
# FIXME: run the garb -- three texts should be removed
# Shut down the server.
talk_to client 0
send "1032 44 0\n"
simple_expect "=1032"
send "1048 44 0\n"
simple_expect "=1048"
client_death 0
client_death 1
client_death 2
lyskomd_death
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment