Regression tests for ARP matching
This commit is contained in:
1 parent
77f0c84381
commit
a75f9d48be
9 files changed
+165
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_exact_arp_all
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_all {
|
||||
|
||||
forward_simple_arp(@_, 'all', 0); # 0: fool_flg = off
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_all, 0x0);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_exact_arp_controller
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_controller {
|
||||
|
||||
forward_simple_arp(@_, 'controller', 0); # 0: fool_flg = off
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_controller, 0x0);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_exact_arp_fool
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_port {
|
||||
|
||||
forward_simple_arp(@_, 'port', 1); # 1: fool_flg=on
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port, 0x0);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_exact_arp_port
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_port {
|
||||
|
||||
forward_simple_arp(@_, 'port', 0); # 0: fool_flg = off
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port, 0x0);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_wildcard_arp_all
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_wc_all {
|
||||
|
||||
forward_simple_arp(@_, 'all', 0); # 0: fool_flg = off
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_wildcard_arp_controller
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_wc_controller {
|
||||
|
||||
forward_simple_arp(@_, 'controller', 0); # 0: fool_flg = off
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_wildcard_arp_port
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_wc_port {
|
||||
forward_simple_arp(@_, 'port', 1); # 1: fool_flg = on
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl -w
|
||||
# test_forward_wildcard_arp_port
|
||||
|
||||
use strict;
|
||||
use OF::Includes;
|
||||
|
||||
sub forward_wc_port {
|
||||
forward_simple_arp(@_, 'port', 0); # 0: fool_flg = off
|
||||
}
|
||||
|
||||
sub my_test {
|
||||
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port);
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
|
||||
@@ -51,6 +51,16 @@ test_forward_wildcard_icmp_all/run.pl
|
||||
test_forward_wildcard_icmp_controller/run.pl
|
||||
test_forward_wildcard_icmp_fool/run.pl
|
||||
|
||||
## ARP handling Tests
|
||||
test_forward_exact_arp_port/run.pl
|
||||
test_forward_exact_arp_all/run.pl
|
||||
test_forward_exact_arp_controller/run.pl
|
||||
test_forward_exact_arp_fool/run.pl
|
||||
test_forward_wildcard_arp_port/run.pl
|
||||
test_forward_wildcard_arp_all/run.pl
|
||||
test_forward_wildcard_arp_controller/run.pl
|
||||
test_forward_wildcard_arp_fool/run.pl
|
||||
|
||||
## Unusual Data
|
||||
test_ip_options/run.pl
|
||||
##test_ip_protocol/run.pl
|
||||
|
||||
Reference in new issue
Block a user