Commit 2edf2943 authored by Robert Ricci's avatar Robert Ricci

More work on getting the testsute to run on the mini-testbed. Many

tests still didn't work on the mini-testbed. The less important tests
have been removed - a few others just modified to work with fewer
resources.

The tbcmd test is an important one, which would lose something by being
smaller. So, I've made a copy of it which tests a slightly smaller set
of functionality, but will run on the mini-testbed.
parent ea3143b8
basic
basic_rsrv
db1
delaylan1
delaylink
lan1
......@@ -9,7 +7,7 @@ mini_nodes
mini_set-ip
simplelink
singlenode
tbcmd
mini_tbcmd
trivial
fixed
simplex
......
......@@ -11,8 +11,8 @@ set lan1 [$ns make-lan "$node1 $node2 $node3" 100Mb 0ms]
set link1 [$ns duplex-link $node4 $node1 100Mb 50ms DropTail]
set link2 [$ns duplex-link $node4 $node3 10Mb 100ms DropTail]
tb-fix-node $node1 pc14
tb-fix-node $node3 pc102
tb-fix-node $node1 pc1
tb-fix-node $node3 pc6
$ns run
......@@ -5,8 +5,6 @@ set ns [new Simulator]
set node1 [$ns node]
set node2 [$ns node]
$ns duplex-link $node1 $node2 100Mb 0ms DropTail
$ns duplex-link $node1 $node2 100Mb 0ms DropTail
$ns duplex-link $node1 $node2 100Mb 0ms DropTail
$ns duplex-link $node1 $node2 100Mb 0ms DropTail
......
......@@ -2,14 +2,14 @@ set ns [new Simulator]
set node0 [$ns node]
set node1 [$ns node]
set node2 [$ns node]
set node3 [$ns node]
set node4 [$ns node]
set node5 [$ns node]
$ns duplex-link $node0 $node1 100Mb .1ms DropTail
$ns duplex-link $node0 $node3 10Mb 100ms DropTail
$ns duplex-link $node3 $node4 100Mb .1ms DropTail
$ns duplex-link $node3 $node5 100Mb .1ms DropTail
$ns duplex-link $node2 $node4 100Mb .1ms DropTail
$ns duplex-link $node3 $node1 100Mb .1ms DropTail
$ns run
delete from os_info where osid = "MYOS";
insert into os_info (osid,description,version,pid) values ("MYOS","Test OS","0","testbed");
NOT A FULL TEST!
This is a test of all the tb-* commands. It also checks does checks on
virt_lans and virt_nodes to make sure they done the right thing.
source tb_compat.tcl
set ns [new Simulator]
set node0 [$ns node]
set node1 [$ns node]
set node2 [$ns node]
set lan0 [$ns make-lan "$node0 $node2 $node1" 100Mb 0ms]
tb-set-node-lan-delay $node0 $lan0 100ms
tb-set-node-lan-bandwidth $node0 $lan0 20Mb
tb-set-node-lan-loss $node0 $lan0 0.4
tb-set-node-lan-params $node1 $lan0 150ms 30Mb 0.0
set node3 [$ns node]
set link0 [$ns duplex-link $node2 $node3 100Mb 0ms DropTail]
tb-set-link-loss $link0 0.1
set node4 [$ns node]
$ns duplex-link $node4 $node1 100Mb 0ms DropTail
tb-set-link-loss $node4 $node1 0.025
tb-set-ip $node4 1.0.4.1
tb-set-ip-interface $node1 $node4 1.0.0.1
tb-set-ip-link $node2 $link0 1.0.0.2
tb-set-ip-lan $node1 $lan0 1.0.0.3
tb-set-hardware $node4 pc
tb-set-node-os $node4 MYOS
tb-set-node-cmdline $node4 "my command line"
tb-set-node-rpms $node4 "my node rpms"
tb-set-node-startup $node4 "my node startup"
tb-set-node-tarfiles $node4 dira tara dirb tarb dirc tarc
tb-set-node-deltas $node4 "deltas!"
tb-set-node-failure-action $node4 nonfatal
$ns run
tb_prerun("tbprerun",0);
@result = (
["l8","0.00","100000","0.000","node2:0"],
["l8","0.00","100000","0.000","node2:0"],
["link0","0.00","100000","0.051","node0:1"],
["link0","0.00","100000","0.051","node3:0"],
["lan0","100.00","20000","0.400","node0:0"],
["lan0","0.00","100000","0.000","node2:0"],
["lan0","150.00","30000","0.000","node1:0"],
);
tb_compare("select vname,delay,bandwidth,lossrate,member from virt_lans" .
" where pid=\"testbed\" and eid=\"test\"",\@result);
@result = (
["0:1.0.0.2","node0","pc"],
["0:1.0.0.3 1:1.0.0.1","node1","pc"],
["0:1.0.0.4 1:1.0.0.2","node2","pc"],
["0:1.0.0.3","node3","pc"],
["0:1.0.4.1","node4","pc"],
);
tb_compare("select ips,vname,type from virt_nodes" .
" where pid=\"testbed\" and eid=\"test\"",\@result);
@result = (
["0:1.0.4.1","MYOS","my command line","my node rpms","deltas!","my node startup","dira tara:dirb tarb:dirc tarc","nonfatal","pc"], );
tb_compare("select ips,osid,cmd_line,rpms,deltas,startupcmd,tarfiles,failureaction,type" .
" from virt_nodes where pid=\"testbed\" and eid=\"test\"" .
" and vname=\"node4\"",\@result);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbend",0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment