Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
integration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
f02eac88
Commit
f02eac88
authored
5 years ago
by
Rick Carback
Browse files
Options
Downloads
Patches
Plain Diff
Dropped registration messages (or messages to itself
parent
5a75a22a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
basice2e/run.sh
+35
-12
35 additions, 12 deletions
basice2e/run.sh
with
35 additions
and
12 deletions
basice2e/run.sh
+
35
−
12
View file @
f02eac88
...
...
@@ -3,7 +3,6 @@
# NOTE: This is verbose on purpose.
set
-e
set
-x
rm
-fr
results
||
true
rm
blob
*
||
true
...
...
@@ -77,6 +76,29 @@ runclients() {
echo
"Starting clients..."
CTR
=
0
# Registration pass
for
cid
in
$(
seq
4 7
)
do
eval
NICK
=
\$
{
NICK
${
cid
}
}
# Send a regular message
# NOTE: This is deliberately broken not to send -E email$cid@email.com
# when UDB is fixed to allow concurrent registration, put it back in.
CLIENTCMD
=
"timeout 180s ../bin/client
$CLIENTOPTS
-f blob
$cid
-i
$cid
-d
$cid
-m
\"
Hello,
$cid
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client
$cid
.out 2>&1 &
PIDVAL
=
$!
eval
CLIENTS
${
CTR
}
=
$PIDVAL
echo
"
$CLIENTCMD
--
$PIDVAL
"
CTR
=
$((
$CTR
+
1
))
done
echo
"WAITING FOR
$CTR
CLIENTS TO EXIT..."
for
i
in
$(
seq
0
$((
$CTR
-
1
))
)
do
eval echo
"Waiting on
\$
{CLIENTS
${
i
}
} ..."
eval wait
\$
{
CLIENTS
${
i
}
}
done
# Now send messages to each other
for
cid
in
$(
seq
4 7
)
do
# TODO: Change the recipients to send multiple messages. We can't
...
...
@@ -89,7 +111,7 @@ runclients() {
nid
=
$((
((
$cid
+
1
)
%
4
)
+
4
))
eval
NICK
=
\$
{
NICK
${
cid
}
}
# Send a regular message
CLIENTCMD
=
"timeout 80s ../bin/client
$CLIENTOPTS
-f blob
$cid
-i
$cid
-d
$nid
-m
\"
Hello,
$nid
\"
"
CLIENTCMD
=
"timeout
1
80s ../bin/client
$CLIENTOPTS
-f blob
$cid
-i
$cid
-d
$nid
-m
\"
Hello,
$nid
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client
$cid$nid
.out 2>&1 &
PIDVAL
=
$!
eval
CLIENTS
${
CTR
}
=
$PIDVAL
...
...
@@ -113,6 +135,8 @@ PIDVAL=$!
echo
$PIDVAL
>>
results/serverpids
echo
"
$UDBCMD
--
$PIDVAL
"
sleep
10
# Start a dummy client
DUMMYCMD
=
"../bin/client
$CLIENTOPTS
-i 23 -d 23 -m
\"
dummy
\"
--dummyfrequency 2 -f blobdummy"
$DUMMYCMD
>>
$DUMMYOUT
2>&1 &
...
...
@@ -120,6 +144,11 @@ PIDVAL=$!
echo
$PIDVAL
>>
results/serverpids
echo
"
$DUMMYCMD
--
$PIDVAL
"
echo
"RUNNING CLIENTS..."
runclients
echo
"RUNNING CLIENTS (2nd time)..."
runclients
# Register two users and then do UDB search on each other
CLIENTCMD
=
"timeout 60s ../bin/client
$CLIENTOPTS
-f blob9 -E spencer@elixxir.io -i 9 -d 9 -m
\"
Hi
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9.out 2>&1 &
...
...
@@ -128,35 +157,29 @@ echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
CLIENTCMD
=
"timeout 60s ../bin/client
$CLIENTOPTS
-f blob18 -E bernardo@elixxir.io -i 18 -d 3 -m
\"
SEARCH EMAIL spencer@elixxir.io
\"
--keyParams 3,4,2,1.0,2"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client18.out 2>&1 &
eval
$CLIENTCMD
>>
$CLIENTOUT
/client18.out 2>&1
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
CLIENTCMD
=
"timeout 60s ../bin/client
$CLIENTOPTS
-f blob9 -i 9 -d 3 -m
\"
SEARCH EMAIL bernardo@elixxir.io
\"
--keyParams 3,4,2,1.0,2"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9.out 2>&1 &
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9.out 2>&1
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
# Send multiple E2E encrypted messages between users that discovered each other
CLIENTCMD
=
"timeout 60s ../bin/client
$CLIENTOPTS
-i 18 -d 9 -f blob18 -m
\"
Hello, 9, with E2E Encryption
\"
--end2end --dummyfrequency 0.1"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client18_rekey.out 2>&1 &
eval
$CLIENTCMD
>>
$CLIENTOUT
/client18_rekey.out 2>&1
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
sleep
2
CLIENTCMD
=
"timeout 60s ../bin/client
$CLIENTOPTS
-i 9 -d 18 -f blob9 -m
\"
Hello, 18, with E2E Encryption
\"
--end2end --dummyfrequency 0.1"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9_rekey.out 2>&1 &
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9_rekey.out 2>&1
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
echo
"RUNNING CLIENTS..."
runclients
echo
"RUNNING CLIENTS (2nd time)..."
runclients
# Confirm all messages and rekeys by counting with grep
grep
-ac
"Sending Message to 9, Spencer"
$CLIENTOUT
/client18_rekey.out
>>
$CLIENTOUT
/client18.out
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment