regress: no_emerg cmd line option

Added the ability to disable emergency flow table tests
This commit is contained in:
Glen Gibb
2010-03-10 17:31:00 -08:00
parent c0aa21014a
commit 2d71bf3848
9 changed files with 41 additions and 13 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ Changelog
test_set_nw_dst/ -> cleanup
test_failover_startup/ -> argv parsing was broken
- Add new test : test_set_dl_nw_flip -> flip dl & nw addresses
- Add new command line options : no_vlan, no_slicing and no_barrier
- Add new command line options : no_vlan, no_slicing and no_barrier,
no_emerg
- Add ability to run a single test with --testPath
- New debugging function : dpctl_show_flows
+3
View File
@@ -43,6 +43,9 @@ push @ARGV, "--no_slicing";
# The hardware can not support barrier
push @ARGV, "--no_barrier";
# The hardware can not support emergency flow table
push @ARGV, "--no_emerg";
# Check for listener
if ( defined($ENV{'OFT_HP_LISTENER'}) ) {
push @ARGV, "--listener=$ENV{OFT_HP_LISTENER}";
+3
View File
@@ -43,6 +43,9 @@ push @ARGV, "--no_slicing";
# The hardware can not support barrier
push @ARGV, "--no_barrier";
# The hardware can not support emergency flow table
push @ARGV, "--no_emerg";
# Check for listener
if ( defined($ENV{'OFT_HP_LISTENER'}) ) {
push @ARGV, "--listener=$ENV{OFT_HP_LISTENER}";
+3
View File
@@ -40,6 +40,9 @@ push @ARGV, "--less_ports";
# Don't bother with QoS currently, it's broken...
push @ARGV, "--no_slicing";
# The bother with emergency flow table tests, it's not supported...
push @ARGV, "--no_emerg";
# Don't forget to configure the OVS_ROOT environment variable
# Jean II
+3
View File
@@ -33,6 +33,9 @@ push @ARGV, "--root=$ENV{'OFT_ROOT'}", "--common-st-args=ovs_user", "--controlle
# Use a single random port instead of all four
push @ARGV, "--less_ports";
# The bother with emergency flow table tests, it's not supported...
push @ARGV, "--no_emerg";
# Don't forget to configure the OVS_ROOT environment variable
# Jean II
+3
View File
@@ -35,6 +35,9 @@ push @ARGV, "--root=$ENV{'OFT_ROOT'}", "--common-st-args=ovs_user", "--controlle
# Use a single random port instead of all four
push @ARGV, "--less_ports";
# The bother with emergency flow table tests, it's not supported...
push @ARGV, "--no_emerg";
# Don't forget to configure the OVS_ROOT environment variable
# Jean II
+10 -1
View File
@@ -69,6 +69,7 @@ my $ignoreByteCount;
my $noVlan;
my $noSlicing;
my $noBarrier;
my $noEmerg;
my $lessPorts;
sub run_regress_test {
@@ -102,6 +103,7 @@ sub run_regress_test {
"no_vlan" => \$noVlan,
"no_slicing" => \$noSlicing,
"no_barrier" => \$noBarrier,
"no_emerg" => \$noEmerg,
"less_ports" => \$lessPorts
)
and ( $help eq '' )
@@ -284,7 +286,7 @@ SYNOPSIS
[--map <mapfile>]
[--project <project>] [--project <project>] ...
[--testPath <test>]
[--no_vlan] [--no_slicing] [--no_barrier]
[--no_vlan] [--no_slicing] [--no_barrier] [--no_emerg]
[--ci <test_tool>] [--citest <test_name>]
[--listener <listener>]
[--failfast]
@@ -338,6 +340,9 @@ OPTIONS
--no_barrier
Do not run barrier tests
--no_emerg
Do not run emergency flow table tests
--listener <listener>
Specify port that the switch is listening on
@@ -624,6 +629,10 @@ sub runTest {
if ( defined($noBarrier) ) {
$args .= " --no_barrier";
}
# Some platforms can not do emergency flow table
if ( defined($noEmerg) ) {
$args .= " --no_emerg";
}
# Don't do all ports on some platforms, it's slow and useless...
if ( defined($lessPorts) ) {
+1
View File
@@ -234,6 +234,7 @@ sub nftest_init {
"no_vlan",
"no_slicing",
"no_barrier",
"no_emerg",
"less_ports"
)
)
@@ -85,21 +85,23 @@ sub test_emergency_cache_second {
sub my_test {
my ($sock, $options_ref) = @_;
#This test uses two ports
my $inport = 0;
my $outport = 1;
my $wildcards = 0; #exact match
if ( not defined( $$options_ref{'no_emerg'} ) ) {
#This test uses two ports
my $inport = 0;
my $outport = 1;
my $wildcards = 0; #exact match
# Wait until switch notices disconnection. it depends on implementation
my $wait_timer = 20;
# Wait until switch notices disconnection. it depends on implementation
my $wait_timer = 20;
my $test_pkt = test_emergency_cache_first($ofp, $sock, $options_ref, $inport, $outport, $wildcards);
my $test_pkt = test_emergency_cache_first($ofp, $sock, $options_ref, $inport, $outport, $wildcards);
# Wait until ofprotocol notices that connection is broken
sleep $wait_timer;
# Wait until ofprotocol notices that connection is broken
sleep $wait_timer;
# chek if the emergency table has become active
test_emergency_cache_second($test_pkt, $options_ref, $inport, $outport);
# chek if the emergency table has become active
test_emergency_cache_second($test_pkt, $options_ref, $inport, $outport);
}
}
run_black_box_test( \&my_test, \@ARGV );