%%
%deffont "standard" xfont "helvetica-medium-r", tfont "standard.ttf", tmfont "hoso6.ttf"
%deffont "thick" xfont "helvetica-bold-r", tfont "thick.ttf", tmfont "hoso6.ttf"
%deffont "typewriter" xfont "courier-medium-r", tfont "typewriter.ttf", tmfont "hoso6.ttf"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Default settings per each line numbers.
%%
%default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
%default 2 size 7, vgap 10, prefix " ", ccolor "black"
%default 3 size 2, bar "gray70", vgap 10
%default 4 size 5, fore "gray20", vgap 30, prefix " ", font "standard"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Default settings that are applied to TAB-indented lines.
%%
%tab 1 size 5, vgap 40, prefix "  ", icon box "green" 50
%tab 2 size 4, vgap 40, prefix "      ", icon arc "yellow" 50
%tab 3 size 3, vgap 40, prefix "            ", icon delta3 "white" 40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%page

%size 6.5, font "standard", back "white", ccolor "black"

%center

Regression testing of network code
User-Mode Linux and FreeSWAN

%size 5, fore "darkblue"
Michael Richardson
%size 4.5
mcr@freeswan.org
Talk at: http://www.sandelman.ca/SSW/freeswan/fsumltesting/

%page 

The talk

	what is the problem
	how we used to do this
	the first User-Mode-Linux system
	the second User-Mode-Linux system
	conclusion

%page

The problem

	FreeSWAN is in implementation of IPsec
	encrypt and authenticates traffic between systems
	key management aims to never repeat keys
	important pieces live in the kernel

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

Schematic of components

%CENTER
%IMAGE "plutotest.gif"



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

Typical test network


%CENTER
%IMAGE "testsetup1.gif"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

A more complicated setup

%CENTER
%IMAGE "testsetup3.gif"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

How one does testing


%CENTER
%IMAGE "testsetup2.gif"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

Original UML attempt


%CENTER
%IMAGE "single_netjig.gif"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

Second UML attempt


%CENTER
%IMAGE "multi_netjig.gif"

%page

Example 2host-test.tcl

%size 3

spawn -noecho -open [open "|$netjig_prog --cmdproto $debugjig 2>@stderr" w+]
set netjig1 $spawn_id

newswitch $netjig1 "$arpreply east"
newswitch $netjig1 "public"
newswitch $netjig1 "$arpreply west"

if {[info exists netjig_extra]} {
    playnjscript $netjig1 $netjig_extra
}

trace variable expect_out(buffer) w log_by_tracing

startuml east 
startuml west

loginuml east
loginuml west

%page

Example 2host-test.tcl (part 2)

%size 3

inituml east
inituml west

record $netjig1 east $recordeast
setupplay $netjig1 east $playeast
runuml $netjig1
send -i $umlid(east,spawnid) "halt\r"
expect -i $umlid(east,spawnid) eof

%page

How to setup

	read doc/makecheck.html 
	http://www.freeswan.org/freeswan_snaps/CURRENT-SNAP/doc/makecheck.html
	make uml will build everything
	need to setup umlsetup.sh with paths

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

Conclusions

	frequent testing 
	support for kernel code tests
	support for keying level tests
	support for script tests
	about 43 tests so far (36 kernel, 1 pluto, 6 packaging)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

THE DEMO.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%bgrad 0 0 256 0 0 "white" "blue"

The END.




