• Christopher Alfeld's avatar
    Nice utility for constructing tb_compare parts of tests. It works like this. · 8b214a9a
    Christopher Alfeld authored
    Say I want to check the contents of the virt_lans table.  I run my
    experiment through tbprerun, and manually inspect virt_lans to make
    sure it's correct.  Then I do something like:
    
    dbdump tbdb_calfeld 'select vname,delay,bandwidth,lossrate,member from virt_lans where pid="testbed" and eid="test"'
    
    dbdump should output something like:
    
    @result = (
    ["link2","0","100","0.025","node4:2"],
    ["link2","0","100","0.025","node5:1"],
    ["link3","0","100","0.000","node6:0"],
    ["link3","0","100","0.000","node5:2"],
    ["lan2","25","100","0.000","node4:0"],
    ["lan2","25","100","0.000","node3:1"],
    ["link4","500","45","0.000","node6:1"],
    ["link4","500","45","0.000","node1:1"],
    ["lan3","50","100","0.000","node1:0"],
    ["lan3","50","100","0.000","node2:0"],
    ["lan3","50","100","0.000","node3:0"],
    ["link1","0","100","0.000","node4:1"],
    ["link1","0","100","0.000","node5:0"],
    );
    
    which I copy and paste into my test script and put immediately under
    it the command:
    
    tb_compare("select vname,delay,bandwidth,lossrate,member from virt_lans" .
    	" where pid=\"testbed\" and eid=\"test",\@result);
    8b214a9a
dumpdb 652 Bytes