Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 1
Introduction
This document is a brief introduction to the testing scipts ive hacked together for DSA switches. It describes
the hardware currently being tested, the hardware setup, software setup, how to run the tests and what the
current tests do. Lastly a section lists further work.
Chapter 2
SoC
eth1
Test Host
lan0
lan1
lan2
Switch #0
eth10
eth11
eth12
eth13
lan3
0
eth14
lan4
1
eth15
Switch #1
eth16
lan5
lan6
lan7
lan8
eth17
9
Media
Converter
Optical4
Switch #2
Optical3
Chapter 3
Chapter 4
Tests
4.1 Common command line parameters
All tests currently share the same command line parameters, and shown in listing 4.1. host is mandatory.
Login credentials must be provided, either the root password, or an ssh key which allows root to login
without a password. Note that the ~/.ssh directory is not searched for the key, so pass either an absolute or
relative path to the key file. A verbose level of 2 shows each test as it is run. Enabling failfast is useful for
debugging a failed test. The System Under Test will be left in the state the test failed, making it possible to
log in and take a look around.
. / b r i d g e _ t e s t . py h e l p
u s a g e : b r i d g e _ t e s t . py [h ] [ h o s t HOST] [key KEY] [p a s s w o r d PASSWORD]
[ v e r b o s e VERBOSE ] [ f a i l f a s t ]
Run some B r i d g e t e s t s .
o p t i o n a l arguments :
h , h e l p
show t h i s h e l p m essag e and e x i t
h o s t HOST
h o s t n a m e o f SUT t o t e s t
key KEY
F i l e n a m e f o r s s h key
p a s s w o r d PASSWORD, p PASSWORD
Ro o t p a s s w o r d f o r s u t t o t e s t
v e r b o s e VERBOSE, v VERBOSE
Run t h e t e s t w i t h a v e r b o s e l e v e l
f a i l f a s t , f
E x i t t h e t e s t a s so o n a s a t e s t f a i l s
Listing 4.1: Test command line options
Some test need to manipulate the test hosts interfaces. Such tests must be run as root, preferably with
sudo. An error will be generated when root permission is required but not available.
Chapter 5
Further Work
The current tests are tied to the Zodiac development board. 8 test interfaces are assumed, the names of the
SUT interfaces are hard coded, and knowledge of what port is on which switch is embedded in the tests. It
is unlikely that others have access to boards with as many interfaces. 5 interfaces are typical for Wireless
LAN Access Points. Thus:
1. Create tests using four interfaces. This is based on the assumption a quad Ethernet card will be used
to provide the host interfaces.
2. Create configuration files which list the SUT interface names. This will allow the same test to be run
on different hardware which uses different interface names.
3. Add a ping_individual_vlan_test.py, which passes VLAN tagged frames as well as untagged frames,
Make use of vconfig to create vlan devices and place IP addresses on these interfaces, which should
be pingable.
4. Add a bridge_vlan_test.py which tests the VLAN capabilities of bridges.
5. More tests...