regress: --no_barrier to disable barrier tests
Barrier tests can be disabled via the --no_barrier command line arg Change submitted by: Jean Tourrilhes <jt@hpl.hp.com>
This commit is contained in:
1 parent
84bd3acc54
commit
af01ea5408
4 files changed
+38
-29
No files matched your search
@@ -67,6 +67,7 @@ my $sendDelay;
|
||||
my $baseIdle;
|
||||
my $ignoreByteCount;
|
||||
my $noSlicing;
|
||||
my $noBarrier;
|
||||
my $lessPorts;
|
||||
|
||||
sub run_regress_test {
|
||||
@@ -98,6 +99,7 @@ sub run_regress_test {
|
||||
"base_idle=s" => \$baseIdle,
|
||||
"ignore_byte_count" => \$ignoreByteCount,
|
||||
"no_slicing" => \$noSlicing,
|
||||
"no_barrier" => \$noBarrier,
|
||||
"less_ports" => \$lessPorts
|
||||
)
|
||||
and ( $help eq '' )
|
||||
@@ -587,6 +589,10 @@ sub runTest {
|
||||
if ( defined($noSlicing) ) {
|
||||
$args .= " --no_slicing";
|
||||
}
|
||||
# Some platforms can not do barrier - Jean II
|
||||
if ( defined($noBarrier) ) {
|
||||
$args .= " --no_barrier";
|
||||
}
|
||||
|
||||
# Don't do all ports on some platforms, it's slow and useless...
|
||||
if ( defined($lessPorts) ) {
|
||||
|
||||
@@ -232,6 +232,7 @@ sub nftest_init {
|
||||
"num_ports=i",
|
||||
"common-st-args=s",
|
||||
"no_slicing",
|
||||
"no_barrier",
|
||||
"less_ports"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,44 +7,46 @@ use OF::Includes;
|
||||
sub my_test {
|
||||
my ($sock, $options_ref) = @_;
|
||||
|
||||
my $in_port = $$options_ref{'port_base'};
|
||||
my $out_port = $in_port + 1;
|
||||
if ( not defined( $$options_ref{'no_barrier'} ) ) {
|
||||
my $in_port = $$options_ref{'port_base'};
|
||||
my $out_port = $in_port + 1;
|
||||
|
||||
# RUOK?
|
||||
send_get_config_request($ofp, $sock, 0xdeadbeef);
|
||||
wait_for_get_config_reply($ofp, $sock, 0xdeadbeef);
|
||||
# RUOK?
|
||||
send_get_config_request($ofp, $sock, 0xdeadbeef);
|
||||
wait_for_get_config_reply($ofp, $sock, 0xdeadbeef);
|
||||
|
||||
my $base_packet = get_default_black_box_pkt($in_port, $out_port);
|
||||
my $base_packet = get_default_black_box_pkt($in_port, $out_port);
|
||||
|
||||
my $wildcards = 0x0000;
|
||||
my $flags = $enums{'OFPFF_CHECK_OVERLAP'};
|
||||
my $max_idle = 0x0;
|
||||
my $packet = create_flow_mod_from_udp($ofp, $base_packet, $in_port, $out_port, $max_idle, $flags, $wildcards);
|
||||
my $wildcards = 0x0000;
|
||||
my $flags = $enums{'OFPFF_CHECK_OVERLAP'};
|
||||
my $max_idle = 0x0;
|
||||
my $packet = create_flow_mod_from_udp($ofp, $base_packet, $in_port, $out_port, $max_idle, $flags, $wildcards);
|
||||
|
||||
# FOO
|
||||
print $sock $packet;
|
||||
# FOO
|
||||
print $sock $packet;
|
||||
|
||||
my $wildcards = 0x03fe;
|
||||
my $flags = $enums{'OFPFF_SEND_FLOW_REM'};
|
||||
my $packet = create_flow_mod_from_udp($ofp, $base_packet, $in_port, $out_port, $max_idle, $flags, $wildcards);
|
||||
my $wildcards = 0x03fe;
|
||||
my $flags = $enums{'OFPFF_SEND_FLOW_REM'};
|
||||
my $packet = create_flow_mod_from_udp($ofp, $base_packet, $in_port, $out_port, $max_idle, $flags, $wildcards);
|
||||
|
||||
# BAR
|
||||
print $sock $packet;
|
||||
# BAR
|
||||
print $sock $packet;
|
||||
|
||||
my $wildcards = 0x03fd;
|
||||
my $flags = 0x0000;
|
||||
my $packet = create_flow_mod_from_udp($ofp, $base_packet, $in_port, $out_port, $max_idle, $flags, $wildcards);
|
||||
my $wildcards = 0x03fd;
|
||||
my $flags = 0x0000;
|
||||
my $packet = create_flow_mod_from_udp($ofp, $base_packet, $in_port, $out_port, $max_idle, $flags, $wildcards);
|
||||
|
||||
# BAZ
|
||||
print $sock $packet;
|
||||
# BAZ
|
||||
print $sock $packet;
|
||||
|
||||
# SYNC
|
||||
enter_barrier($ofp, $sock, 0x12345678);
|
||||
wait_for_barrier_exit($ofp, $sock, 0x12345678);
|
||||
# SYNC
|
||||
enter_barrier($ofp, $sock, 0x12345678);
|
||||
wait_for_barrier_exit($ofp, $sock, 0x12345678);
|
||||
|
||||
# RUOK?
|
||||
send_get_config_request($ofp, $sock, 0xcafe2009);
|
||||
wait_for_get_config_reply($ofp, $sock, 0xcafe2009);
|
||||
# RUOK?
|
||||
send_get_config_request($ofp, $sock, 0xcafe2009);
|
||||
wait_for_get_config_reply($ofp, $sock, 0xcafe2009);
|
||||
}
|
||||
}
|
||||
|
||||
run_black_box_test(\&my_test, \@ARGV);
|
||||
@@ -70,7 +70,7 @@ test_queue_config/run.pl
|
||||
## These assume that there is a queue with queue_id=1 at port 1.
|
||||
## Uncomment if your setup supports this.
|
||||
## Should work OK with the reference implementation
|
||||
test_queue_stats/run.pl
|
||||
#test_queue_stats/run.pl
|
||||
test_queue_forward/run.pl
|
||||
|
||||
## Unusual Data
|
||||
|
||||
Reference in new issue
Block a user