regress: --no_vlan to disable VLAN testing
VLAN not tested if --no_vlan option is specified. Allows tests to run against switches that don't support VLAN tags in OpenFlow. Change submitted by: Jean Tourrilhes <jt@hpl.hp.com>
This commit is contained in:
1 parent
af01ea5408
commit
efb47d75c0
10 files changed
+40
-9
No files matched your search
@@ -66,6 +66,7 @@ my $portBase = 0;
|
||||
my $sendDelay;
|
||||
my $baseIdle;
|
||||
my $ignoreByteCount;
|
||||
my $noVlan;
|
||||
my $noSlicing;
|
||||
my $noBarrier;
|
||||
my $lessPorts;
|
||||
@@ -98,6 +99,7 @@ sub run_regress_test {
|
||||
"send_delay=s" => \$sendDelay,
|
||||
"base_idle=s" => \$baseIdle,
|
||||
"ignore_byte_count" => \$ignoreByteCount,
|
||||
"no_vlan" => \$noVlan,
|
||||
"no_slicing" => \$noSlicing,
|
||||
"no_barrier" => \$noBarrier,
|
||||
"less_ports" => \$lessPorts
|
||||
@@ -585,6 +587,10 @@ sub runTest {
|
||||
if ( defined($ignoreByteCount) ) {
|
||||
$args .= " --ignore_byte_count";
|
||||
}
|
||||
# Some setup can not do VLANs - Jean II
|
||||
if ( defined($noVlan) ) {
|
||||
$args .= " --no_vlan";
|
||||
}
|
||||
# Some platforms can not do Slicing - Jean II
|
||||
if ( defined($noSlicing) ) {
|
||||
$args .= " --no_slicing";
|
||||
|
||||
@@ -231,6 +231,7 @@ sub nftest_init {
|
||||
"ignore_byte_count",
|
||||
"num_ports=i",
|
||||
"common-st-args=s",
|
||||
"no_vlan",
|
||||
"no_slicing",
|
||||
"no_barrier",
|
||||
"less_ports"
|
||||
|
||||
@@ -22,7 +22,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_all, 0x0);
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_all_vlan, 0x0);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_all_vlan, 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -24,7 +24,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_controller, 0x0);
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_controller_vlan, 0x0);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_ports( $ofp, $sock, $options_ref, \&forward_controller_vlan, 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -6,7 +6,15 @@ use OF::Includes;
|
||||
|
||||
sub forward_port {
|
||||
|
||||
my @chg_field = ('vlan_vid', 'vlan_pcp', 'dl_src', 'dl_dst', 'nw_src', 'nw_dst', 'tp_src', 'tp_dst');
|
||||
my ( $ofp, $sock, $options_ref, $in_port_offset, $out_port_offset,
|
||||
$wildcards ) = @_;
|
||||
|
||||
my @chg_field;
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
@chg_field = ('vlan_vid', 'vlan_pcp', 'dl_src', 'dl_dst', 'nw_src', 'nw_dst', 'tp_src', 'tp_dst');
|
||||
} else {
|
||||
@chg_field = ('dl_src', 'dl_dst', 'nw_src', 'nw_dst', 'tp_src', 'tp_dst');
|
||||
}
|
||||
foreach (@chg_field) {
|
||||
forward_simple(@_, 'port', undef, $_ );
|
||||
}
|
||||
@@ -26,7 +34,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port, 0x0);
|
||||
for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port_vlan, 0x0);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port_vlan, 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
@@ -19,7 +19,9 @@ sub my_test {
|
||||
my ($sock, $options_ref) = @_;
|
||||
|
||||
for_all_port_pairs($ofp, $sock, $options_ref, \&forward_unicast_port, 0x0);
|
||||
for_all_port_pairs($ofp, $sock, $options_ref, \&forward_unicast_vlan_port, 0x0);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_port_pairs($ofp, $sock, $options_ref, \&forward_unicast_vlan_port, 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test(\&my_test, \@ARGV);
|
||||
@@ -21,7 +21,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all);
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all_vlan);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all_vlan);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
@@ -21,7 +21,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller);
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller_vlan);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller_vlan);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
@@ -26,7 +26,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port);
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
@@ -21,7 +21,9 @@ sub my_test {
|
||||
my ( $sock, $options_ref ) = @_;
|
||||
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port);
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan);
|
||||
if ( not defined( $$options_ref{'no_vlan'} ) ) {
|
||||
for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test( \&my_test, \@ARGV );
|
||||
|
||||
Reference in new issue
Block a user