<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 04/02/2013 10:31 AM, Ben West wrote:<br>
</div>
<blockquote
cite="mid:CADSh-SP2qzme7V--97eUnVoWNMX51G+KtXQmb5eL19BiVPfXWQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">Hi Seamus and Dan,<br>
<br>
</div>
<div class="gmail_extra">Replying about having Python on (and
off) OpenWRT:<br>
</div>
<div class="gmail_extra"><br>
The cross-platform nature seems like it would be very helpful
to maintain a single collection of tests vectors to apply as
Commotion finds its way onto more platforms (Windows, OSX).
But, the obvious tradeoff here is the size of the Python
interpreter.<br>
</div>
</div>
</blockquote>
<br>
Agreed!<br>
<blockquote
cite="mid:CADSh-SP2qzme7V--97eUnVoWNMX51G+KtXQmb5eL19BiVPfXWQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<br>
</div>
<div class="gmail_extra">Also, the test scripts that query a
node's OLSR instance via jsoninfo could also run <i>on the
client</i>, rather than directly on the node. The node
would just need to open up the jsoninfo port 9090 on its
firewall behind the public AP interface (or have the client
use its private AP). I can tweak the Python scripts (tho very
little needed) to accommodate this option.<br>
</div>
</div>
</blockquote>
<br>
I think that is a great idea for the openWRT instances. Though, as
we get the other platforms up and running it will be less and less
needed, since we will be running more powerful devices as nodes.<br>
<br>
<blockquote
cite="mid:CADSh-SP2qzme7V--97eUnVoWNMX51G+KtXQmb5eL19BiVPfXWQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Besides that, I think I may be able to
tweak the Python Makefile provided with OpenWRT, so that the
compiled package is much smaller than its current 1.5MByte
footprint. The Python v2.6 implementation bundled into Py4A
(which runs all these tests fine) is <i>only 150kB</i>, by
comparison. Still, admitted that installing another language
on what is already disk- and RAM-bound devices is less than
ideal.<br>
</div>
</div>
</blockquote>
<br>
I don't know what the consensus is, but as much as I would love to
start to play with python on the OpenWRT nodes, I think we will be
able to use the existing testing code you built, along with some
client based tweaks to accurately test a OpenWRT based mesh.<br>
<br>
<blockquote
cite="mid:CADSh-SP2qzme7V--97eUnVoWNMX51G+KtXQmb5eL19BiVPfXWQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<br>
</div>
<div class="gmail_extra">Finally, sorry for using the term
'bytecode.' That's not really what we need; compiled Python
bytecode is neither smaller than source nor stand-alone
executable. What I meant is maybe compile the Python
testsuite into a single standalone executable using a tool
like these:<br>
<a moz-do-not-send="true"
href="http://cx-freeze.sourceforge.net/">http://cx-freeze.sourceforge.net/</a><br>
<a moz-do-not-send="true" href="http://www.pyinstaller.org/">http://www.pyinstaller.org/</a><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Apr 2, 2013 at 8:58 AM,
seamus tuohy <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:s2e@opentechinstitute.org" target="_blank">s2e@opentechinstitute.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hey,
<div class="im"><br>
<br>
On 04/02/2013 04:20 AM, Ben West wrote:<br>
</div>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi All,<br>
<br>
<div class="im"> I've created a repo of a few
basic tests implemented as unittests in
Python 2.6+. This repo contains just the
Python scripts themselves, so that it may be
included later as a submodule into other
repos containing platform-specific packaging
stuff.<br>
<a moz-do-not-send="true"
href="https://github.com/westbywest/commotion-tests-core"
target="_blank">https://github.com/westbywest/commotion-tests-core</a><br>
</div>
</div>
<div class="im"> <br>
Due please note I expect this repo to change,
and even its location to maybe switch to OTI's
github account at some point soon.<br>
<br>
</div>
</div>
<div class="im"> To serve as hopefully
demonstrative examples of the test coverage
possible, the scripts I just checked in test for
the following:<br>
</div>
</div>
<div class="im">
<div>
<ul>
<li>ping localhost</li>
<li>ping gateway IP (either default gateway or
the one assigned by OLSRd smartgateway)</li>
<li>ping Google DNS (aka do we have Internet?)</li>
<li>presence of an active olsrd process</li>
<li>olsrd responds to jsoninfo requests</li>
<li>link quality of the next hop is above a
specified threshold</li>
</ul>
</div>
<div> These scripts should run under the following
Python versions / platforms:<br>
<ul>
<li>Python v2.7+ under Debian/Ubuntu</li>
<li>Python for Android (Py4A) app r5+ /
Scripting Layer for Android (SL4A) app r6+</li>
<li>Python-mini v2.7+ under OpenWRT 12.09+<br>
</li>
</ul>
</div>
<div>... to test the following Commotion
implementations, respectively (where each is
enabled by the user, not by the Python script):<br>
<ul>
<li>commotion-mesh-applet<br>
</li>
<li>Mesh Tether app<br>
</li>
<li> Commotion-OpenWRT DR1, with <b>python</b>,
<b>python-json</b>, and <b>olsrd-mod-jsoninfo</b>
modules installed<br>
</li>
</ul>
</div>
<div>Questions about how to proceed:<br>
<ul>
<li>Whether to proceed with Python-based
testing framework? I tried to heavily
leverage the cross-platform compatibility,
but is it worthwhile?</li>
</ul>
</div>
</div>
</div>
</blockquote>
<div class="im">
<blockquote type="cite">
<div dir="ltr">
<div>
<ul>
<li>The Python for Android implementation
chosen, Py4A, is only Python v2.6. Is
having Python v2.7 on Android worth possibly
compiling it into a custom APK?</li>
<li>Many of the desired test vectors, e.g.
throughput testing, require the test run
simultaneously on at least 2 nodes. It's
pretty easy to write a crude server in
Python to function as one half of a
throughput test, but does the complexity of
running different Python scripts on
different nodes simultaneously become
unreasonable</li>
</ul>
</div>
</div>
</blockquote>
</div>
Not at all, I think that it is necessary to have
different nodes running tests simultaneously. In most of
the openWRT testing situations we run currently, we have
client devices running simultaneously to elucidate
information about the mesh nodes. <br>
<div class="im">
<blockquote type="cite">
<div dir="ltr">
<div>
<ul>
<li>The python-mini module for OpenWRT chews
up 1.5Mbytes of flash, and it doesn't
include unittest by default. This
unfortunately appears to be <i>too much
already</i>; it wouldn't fit on a
Nanostation flash w/o removing lots of
stuff. Maybe this size could be trimmed
down by modifying the python-mini package's
Makefile, or by distributing test scripts in
bytecode form to OpenWRT nodes.<br>
</li>
</ul>
</div>
</div>
</blockquote>
</div>
I think that loading python on to openWRT nodes is
impractical. Having client devices running tests over
the mesh with possible on-node analytics running for
later collection will give us a good idea of QOS without
having to load down the OpenWRT nodes, and as such,
change their performance. We will not get the same level
of detail as the android or desktop nodes, but it is
really the best we can do while maintaining an accurate
image of the nodes performance.
<div>
<div class="h5"><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>
<ul>
<li> <br>
</li>
</ul>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Mar 15, 2013 at
10:14 PM, Andrew Reynolds <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:andrew@opentechinstitute.org"
target="_blank">andrew@opentechinstitute.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">It sounds
reasonable. Could you sketch out what you
have in mind? How<br>
much of the network setup were you thinking
of building into the test<br>
framework vs. simply triggering and testing?<br>
<span><font color="#888888"><br>
-andrew<br>
</font></span>
<div>
<div><br>
On 03/15/2013 02:48 PM, Ben West wrote:<br>
> Hi All,<br>
><br>
> In lieu of recent progress towards
getting Commotion to a working state on<br>
> Android, Ubuntu/Debian. and now
possibly OSX, what thoughts about
building<br>
> a simple and (to whatever degree
feasible) cross-platform testing
framework<br>
> in Python?<br>
><br>
> The general idea is that python
scripts could be used to start hitting
the<br>
> test vectors listed here (note the
server appears to be really slow):<br>
><br>
> <a moz-do-not-send="true"
href="https://code.commotionwireless.net/projects/commotion/wiki/Testing#Mesh-Routing-Tech-Evaluations"
target="_blank">https://code.commotionwireless.net/projects/commotion/wiki/Testing#Mesh-Routing-Tech-Evaluations</a><br>
> <a moz-do-not-send="true"
href="https://code.commotionwireless.net/projects/commotion/wiki/Testing#Testbed-Requirements-based-on-test-suite-defined-above"
target="_blank">https://code.commotionwireless.net/projects/commotion/wiki/Testing#Testbed-Requirements-based-on-test-suite-defined-above</a><br>
> <a moz-do-not-send="true"
href="https://code.commotionwireless.net/projects/commotion/wiki/Testing#Release-Candidate-Test-Regimen"
target="_blank">https://code.commotionwireless.net/projects/commotion/wiki/Testing#Release-Candidate-Test-Regimen</a><br>
><br>
> That is, assuming
Ubuntu/Debian/OSX's python support as a
starting point,<br>
> could these lighweight python
implementations allow for some unified
test<br>
> scripts across platforms?<br>
><br>
> <a moz-do-not-send="true"
href="http://qpython.com/"
target="_blank">http://qpython.com/</a>
(for Android)<br>
> <a moz-do-not-send="true"
href="https://dev.openwrt.org/browser/packages/lang/python/Makefile"
target="_blank">https://dev.openwrt.org/browser/packages/lang/python/Makefile</a>
(for OpenWRT,<br>
> to be compiled as module)<br>
><br>
> Has anyone on the list had good
experience with these Python<br>
> implementations?<br>
><br>
> My original thought for such
testing scripts was to do them in shell<br>
> scripting, but I'm guessing Python
would be easier and more powerful.<br>
><br>
><br>
><br>
</div>
</div>
<div>
<div>>
_______________________________________________<br>
> Commotion-dev mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Commotion-dev@lists.chambana.net"
target="_blank">Commotion-dev@lists.chambana.net</a><br>
> <a moz-do-not-send="true"
href="https://lists.chambana.net/mailman/listinfo/commotion-dev"
target="_blank">https://lists.chambana.net/mailman/listinfo/commotion-dev</a><br>
><br>
<br>
<br>
</div>
</div>
<br>
_______________________________________________<br>
Commotion-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Commotion-dev@lists.chambana.net"
target="_blank">Commotion-dev@lists.chambana.net</a><br>
<a moz-do-not-send="true"
href="https://lists.chambana.net/mailman/listinfo/commotion-dev"
target="_blank">https://lists.chambana.net/mailman/listinfo/commotion-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Ben West
<div><a moz-do-not-send="true"
href="http://gowasabi.net" target="_blank">http://gowasabi.net</a><br>
<a moz-do-not-send="true"
href="mailto:ben@gowasabi.net"
target="_blank">ben@gowasabi.net</a><br>
<a moz-do-not-send="true"
href="tel:314-246-9434" value="+13142469434"
target="_blank">314-246-9434</a><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Commotion-dev mailing list
<a moz-do-not-send="true" href="mailto:Commotion-dev@lists.chambana.net" target="_blank">Commotion-dev@lists.chambana.net</a>
<a moz-do-not-send="true" href="https://lists.chambana.net/mailman/listinfo/commotion-dev" target="_blank">https://lists.chambana.net/mailman/listinfo/commotion-dev</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Commotion-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Commotion-dev@lists.chambana.net">Commotion-dev@lists.chambana.net</a><br>
<a moz-do-not-send="true"
href="https://lists.chambana.net/mailman/listinfo/commotion-dev"
target="_blank">https://lists.chambana.net/mailman/listinfo/commotion-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Ben West
<div><a moz-do-not-send="true" href="http://gowasabi.net"
target="_blank">http://gowasabi.net</a><br>
<a moz-do-not-send="true" href="mailto:ben@gowasabi.net"
target="_blank">ben@gowasabi.net</a><br>
314-246-9434<br>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>