[tor-dev] Quickly testing TOR using Chutney and Fluxcapacitor

Marek Majkowski marek at popcount.org
Mon Sep 9 17:27:05 UTC 2013


On Mon, Sep 9, 2013 at 12:02 AM, Marek Majkowski <marek at popcount.org> wrote:
>
> I was not aware of this script. I'll take a look.

$ cat chutney/tools/bootstrap-network.sh
[...]
offset=$(expr \( $(date +%s) + $VOTING_OFFSET \) % 300)
CONFOPT="TestingV3AuthVotingStartOffset"
for file in net/nodes/*a/torrc; do
    sed -i.bak -e "s/^${CONFOPT}.*$/${CONFOPT} $offset/1" $file
done
[...]

That's just cheating! It may work, but it's pretty ugly :)

Without fluxcapacitor, as you suggested bootstrapping takes around 24
seconds, with FC ~10 sec.

$ export CHUTNEY_PATH=$HOME/tor/chutney
# Stop network after the script is done
$ echo './chutney stop $CHUTNEY_NETWORK' >> src/test/test-network.sh
# add tor-gencert to the PATH
$ export PATH=$PATH:$PWD/src/tools

$ time ./src/test/test-network.sh
real    0m23.592s
user    0m2.108s
sys     0m0.452s

$ time ~/fluxcapacitor/fluxcapacitor ./src/test/test-network.sh
real    0m10.164s
user    0m2.216s
sys     0m1.676s


With options that make tor less noisy it's even faster: ~6.5 seconds:

$ echo -e "TokenBucketRefillInterval 1
second\nServerDNSDetectHijacking 0\n" >>
$CHUTNEY_PATH/torrc_templates/common.i

$ time ~/fluxcapacitor/fluxcapacitor ./src/test/test-network.sh
real    0m6.489s
user    0m2.464s
sys     0m1.296s


Fluxcapacitor does make it go faster, but the test (script) must be
self-contained, ie: it must tear down the network after it's done.

Marek


More information about the tor-dev mailing list