diff --git a/contrib/jenkins_tests/test.sh b/contrib/jenkins_tests/test.sh index 5aef47023..db315ef79 100755 --- a/contrib/jenkins_tests/test.sh +++ b/contrib/jenkins_tests/test.sh @@ -130,9 +130,9 @@ for test_link in $test_ip_list; do ${sudo_cmd} $timeout_exe ${vutil} -a "${test_app}" -x "--load-vma=${test_lib} " -t "${test}:tc[1-9]$" \ -s "${test_remote_ip}" -p "${test_remote_port}" -l "${test_dir}/${test_name}.log" else - ${sudo_cmd} $timeout_exe $PWD/tests/verifier/verifier.pl -a ${test_app} -x " --pre-warmup-wait=2 --debug " \ + ${sudo_cmd} $timeout_exe $PWD/tests/verifier/verifier.pl -o 4 -a ${test_app} -x " --pre-warmup-wait=2 --debug " \ -t ${test}:tc[6-9]$ -s ${test_ip} -l ${test_dir}/${test_name}.log \ - -e " XLIO_MEM_ALLOC_TYPE=ANON XLIO_DOCA_RX=0 XLIO_DOCA_TX=0 LD_PRELOAD=$test_lib " \ + -e " XLIO_MEM_ALLOC_TYPE=ANON XLIO_DOCA_RX=1 XLIO_DOCA_TX=1 LD_PRELOAD=$test_lib " \ --progress=0 fi diff --git a/contrib/jenkins_tests/verifier_in_debug.sh b/contrib/jenkins_tests/verifier_in_debug.sh new file mode 100644 index 000000000..0a9ef62ee --- /dev/null +++ b/contrib/jenkins_tests/verifier_in_debug.sh @@ -0,0 +1,2 @@ +#!/bin/bash +PERLDB_OPTS="NonStop AutoTrace" perl -d contrib/verifier/verifier.pl $* diff --git a/contrib/jenkins_tests/vg.sh b/contrib/jenkins_tests/vg.sh index fc6f5d376..ca327a63a 100755 --- a/contrib/jenkins_tests/vg.sh +++ b/contrib/jenkins_tests/vg.sh @@ -42,7 +42,7 @@ else fi test_list="tcp:--tcp" test_lib=${vg_dir}/install/lib/${prj_lib} -test_lib_env="XLIO_MEM_ALLOC_TYPE=ANON XLIO_DOCA_RX=0 XLIO_DOCA_TX=0" +test_lib_env="XLIO_MEM_ALLOC_TYPE=ANON XLIO_DOCA_RX=1 XLIO_DOCA_TX=1" test_app=sockperf test_app_path=${test_dir}/sockperf/install/bin/sockperf vg_tool=/bin/valgrind diff --git a/contrib/jenkins_tests/vutil.sh b/contrib/jenkins_tests/vutil.sh index bd4a2125e..8aad93476 100755 --- a/contrib/jenkins_tests/vutil.sh +++ b/contrib/jenkins_tests/vutil.sh @@ -60,8 +60,8 @@ ts_tcp_pp() ts_tcp_pp_tc6+="client_success='Test ended', 'Summary: Latency is', 'RunTime=10'"${dlm} ts_tcp_pp_tc6+=${client_failure_msgs} #7 - ts_tcp_pp_tc7="#7 - ping-pong option -t30"${dlm} - ts_tcp_pp_tc7+="${sperf} pp -i ${ipaddr} --tcp -t30 ${opts}"${dlm} + ts_tcp_pp_tc7="#7 - ping-pong option"${dlm} + ts_tcp_pp_tc7+="${sperf} pp -i ${ipaddr} --tcp ${opts}"${dlm} ts_tcp_pp_tc7+=${server_success_msgs}${dlm} ts_tcp_pp_tc7+=${server_failure_msgs}${dlm} ts_tcp_pp_tc7+="client_success='Test ended', 'Summary: Latency is', 'RunTime=30'"${dlm} @@ -130,8 +130,8 @@ ts_tcp_tp() ts_tcp_tp_tc6+=${client_success_tp_msgs}${dlm} ts_tcp_tp_tc6+=${client_failure_msgs} #7 - ts_tcp_tp_tc7="#7 - throughput option -t30"${dlm} - ts_tcp_tp_tc7+="${sperf} tp -i ${ipaddr} --tcp -t30 ${opts}"${dlm} + ts_tcp_tp_tc7="#7 - throughput option"${dlm} + ts_tcp_tp_tc7+="${sperf} tp -i ${ipaddr} --tcp ${opts}"${dlm} ts_tcp_tp_tc7+=${server_success_msgs}${dlm} ts_tcp_tp_tc7+=${server_failure_msgs}${dlm} ts_tcp_tp_tc7+=${client_success_tp_msgs}${dlm} @@ -200,7 +200,7 @@ ts_tcp_ul() ts_tcp_ul_tc6+="client_success='Test ended', 'Summary: Latency is', 'RunTime=10'"${dlm} ts_tcp_ul_tc6+=${client_failure_msgs} #7 - ts_tcp_ul_tc7="#7 - under-load option -t30"${dlm} + ts_tcp_ul_tc7="#7 - under-load option"${dlm} ts_tcp_ul_tc7+="${sperf} ul -i ${ipaddr} --tcp -t10 ${opts}"${dlm} ts_tcp_ul_tc7+=${server_success_msgs}${dlm} ts_tcp_ul_tc7+=${server_failure_msgs}${dlm} diff --git a/contrib/verifier/README b/contrib/verifier/README new file mode 100644 index 000000000..af18b1cc9 --- /dev/null +++ b/contrib/verifier/README @@ -0,0 +1,40 @@ +VPERF VERIFIER version 0.01 +================ + +The README is used to introduce the module and provide instructions on +how to install the module, any machine dependencies it may have (for +example C compilers and installed libraries) and any other information +that should be provided before the module is installed. + +A README file is required for CPAN modules since CPAN extracts the +README file from a module distribution so that people browsing the +archive can use it get an idea of the modules uses. It is usually a +good idea to provide version information here so that people can +decide whether fixes for the module are worth downloading. + +INSTALLATION + +To install this module type the following: + + perl Makefile.PL + make + make test + make install + +DEPENDENCIES + +This module requires these other modules and libraries: + + blah blah blah + +COPYRIGHT AND LICENCE + +Put the correct copyright and licence information here. + +Copyright (C) 2011 by Igor Ivanov + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.8.8 or, +at your option, any later version of Perl 5 you may have available. + + diff --git a/contrib/verifier/doc/Test Matrix.xls b/contrib/verifier/doc/Test Matrix.xls new file mode 100644 index 000000000..3ec8c6c08 Binary files /dev/null and b/contrib/verifier/doc/Test Matrix.xls differ diff --git a/contrib/verifier/lib/TE/Common.pm b/contrib/verifier/lib/TE/Common.pm new file mode 100644 index 000000000..f5f098302 --- /dev/null +++ b/contrib/verifier/lib/TE/Common.pm @@ -0,0 +1,114 @@ +## +# @file Common.pm +# +# @brief TE module to define common data. +# +# + +## @class +# Container for common data. +package TE::Common; + +use strict; +use warnings; +use vars qw(@EXPORT); +use base qw(Exporter); +@EXPORT = qw +( +get_error +set_error +TE_ERR_NONE +TE_ERR_FATAL +TE_ERR_CONNECT +TE_ERR_LOGIN +TE_ERR_PROMPT +TE_ERR_PERL +TE_ERR_TIMEOUT +TE_ERR_BREAK +TE_ERR_BAD_ARGUMENT +TE_ERR_CUSTOM +TE_ERR_UNKNOWN +); + +our $last_error = {code => 0, msg => ''}; +our $alias = 'verifier_te'; + +use constant +{ + TE_ERR_NONE => 0, + TE_ERR_FATAL => 1, + TE_ERR_CONNECT => 2, + TE_ERR_LOGIN => 3, + TE_ERR_PROMPT => 4, + TE_ERR_PERL => 5, + TE_ERR_TIMEOUT => 6, + TE_ERR_BREAK => 7, + TE_ERR_BAD_ARGUMENT => 8, + TE_ERR_CUSTOM => 9, + TE_ERR_UNKNOWN => 10, +}; + + +our $conf = + { + options => + { + 'tasks' => undef, + 'username' => "root", + 'password' => "password", + 'targets' => undef, + 'log' => undef, + 'screen_log' => 1, + 'format_log' => 0, + 'silent' => 0, + 'progress' => 1, + 'out_level' => 2, + 'log_level' => 3, + 'email' => undef, + }, + common => + { + 'app' => 'vperf', + 'app_path' => '', + 'host' => 'localhost', + 'host_ip' => undef, + 'flog' => undef, + 'fdump' => undef, + }, + current => + { + 'target' => 'localhost', + }, + }; + + +sub get_error +{ + return ( @_ ? $last_error->{msg} : $last_error->{code} ); +} + + +sub set_error +{ + my ($code, $msg) = @_; + + if (!$msg) + { + $msg = '' if ($code == TE_ERR_NONE); + $msg = 'fatal operation' if ($code == TE_ERR_FATAL); + $msg = 'unknown remote host' if ($code == TE_ERR_CONNECT); + $msg = 'login failed' if ($code == TE_ERR_LOGIN); + $msg = 'timed-out waiting for command prompt' if ($code == TE_ERR_PROMPT); + $msg = 'perl script error' if ($code == TE_ERR_PERL); + $msg = 'pattern match timed-out' if ($code == TE_ERR_TIMEOUT); + $msg = 'pattern match timed-out' if ($code == TE_ERR_BREAK); + $msg = 'pattern match timed-out' if ($code == TE_ERR_BAD_ARGUMENT); + $msg = 'custom error' if ($code == TE_ERR_CUSTOM); + $msg = 'unknown error' if ($code >= TE_ERR_UNKNOWN); + } + $last_error->{code} = $code; + $last_error->{msg} = $msg; +} + + +1; diff --git a/contrib/verifier/lib/TE/Funclet.pm b/contrib/verifier/lib/TE/Funclet.pm new file mode 100644 index 000000000..257c85c29 --- /dev/null +++ b/contrib/verifier/lib/TE/Funclet.pm @@ -0,0 +1,413 @@ +## +# @file Funclet.pm +# +# @brief TE module to define funclets. +# +# + +## @class +# Container for funclets. +package TE::Funclet; + +use strict; +use warnings; + + +# External modules +#use Net::Telnet; +use File::Basename; +use Cwd 'abs_path'; + + +# Own modules +use TE::Common; +use TE::Utility; +use TE::Progress; + + +# Define reference to the common global structure +my $_options = $TE::Common::conf->{options}; +my $_common = $TE::Common::conf->{common}; +my $_current = $TE::Common::conf->{current}; + +# Set of predefined variables that are available inside user script +our $HOST = \$_common->{host}; +our $HOST_IP = \$_common->{host_ip}; +our $TARGET = \$_current->{target}; +my $cwd = Cwd::getcwd(); + +# Common variables and constants +my $_timeout = 30; + + +sub __error +{ + my $status = TE_ERR_NONE; + + $_ = "@_"; + + $status = TE_ERR_CONNECT if (/^unknown remote host/i); + $status = TE_ERR_LOGIN if (/^login failed/i); + $status = TE_ERR_PROMPT if (/^timed-out waiting for command prompt/i); + $status = TE_ERR_TIMEOUT if (/^pattern match timed-out/i); + $status = TE_ERR_UNKNOWN if (!$status); + + # Set error code + set_error($status, "Telnet: $_"); + + # Display message + TE::Utility::error(); + + # Follow special error behaviour + TE::Utility::force_error(); +} + + +sub __waitfor +{ + my ($telnet, $node, $timeout, $prompt, $prompt_reg) = @_; + my @outputs = (); + + my $timeout_counter = 0; + + while( !$telnet->eof() && !get_error()) + { + my ($prematch, $match) = $telnet->waitfor(Timeout => 1, + Match => '/[\n\r]/', + Match => $prompt_reg, + Errmode => sub { return; }); + + # Refresh information in status line in case last output + # contains printed symbols + TE::Progress::update($node, $prematch); + + push @outputs, $prematch . "\n" if defined($prematch ); + if (defined($match)) + { + $timeout_counter = 0; + } + else + { + $timeout_counter ++; + } + + if( (defined($match) && ($match =~ m/$prompt/)) || + (defined($timeout) && ($timeout_counter > $timeout))) + { + # Finish command processing + last; + } + } + + return @outputs; +} + +############################################################################### +# +# Return last error code or error message. +# Valid error numbers are all non-zero integer values. This function returns +# error number if no arguments are passed and error message in case error code +# is passed. +# +############################################################################### +sub errno +{ + return get_error( @_ ); +} + + +############################################################################### +# +# Execute Perl script on a host and return array or scalar +# +############################################################################### +sub perl +{ + my $status = TE_ERR_NONE; + my $result = undef; + + @_ = TE::Utility::clear_array(@_); + + TE::Utility::debug((caller(0))[3] . ":\n{\n" . join("\n", @_) . "\n}\n"); + set_error(TE_ERR_NONE); + + TE::Progress::update($_common->{host}, 'Processing perl script ...'); + + my $cmd = join("\n", @_); + + # Execute script + no strict; + no warnings; + my @outputs = eval($cmd) if (!get_error()); + # Save evaluation error + my $eval_err = $@; + use strict; + use warnings; + + if ( !get_error() && $eval_err ) + { + set_error(TE_ERR_PERL, "Perl syntax or runtime error: $eval_err"); + TE::Utility::error(); + TE::Utility::force_error(); + } + + # Form result + $result .= join("", @outputs); + + $status = get_error(); + TE::Utility::debug((caller(0))[3] . ": return = $status\n"); + + return $result; +} + + +############################################################################### +# +# Execute Shell script on host and return standard output +# +############################################################################### +sub shell +{ + my $status = TE_ERR_NONE; + my $result = ''; + + @_ = TE::Utility::clear_array(@_); + + TE::Utility::debug((caller(0))[3] . ":\n{\n" . join("\n", @_) . "\n}\n"); + set_error(TE_ERR_NONE); + + TE::Progress::update($_common->{host}, 'Executing shell command ...'); + + my (@commands) = @_; + + foreach (@commands) + { + next if ($_ eq ''); + last if (get_error()); + + my $cmd = $_; + my @outputs = (); + + TE::Progress::update(undef, $cmd); + + # Execute script + # which means $cmd will 'pipe' its output to SHELL. That means SHELL can be used + # to read the output of the command (specifically the stuff the command sends to STDOUT). + eval { open SHELL, "$cmd 2>&1 |" or die $! }; + my $eval_err = $@; + if ( !get_error() && $eval_err ) + { + set_error(TE_ERR_UNKNOWN, "Current command \'$cmd\': $eval_err"); + TE::Utility::error(); + TE::Utility::force_error(); + } + + # Form result + if (!get_error()) + { + while () + { + last if (get_error()); + + push @outputs, $_ if defined($_); + + TE::Progress::update(undef, $_); + } + } + + close SHELL; + + # Form result + $result .= join("", @outputs); + + TE::Utility::dump("IN:\n$cmd\nOUT:\n@{[join(\"\", @outputs)]}\n"); + } + + $status = get_error(); + TE::Utility::debug((caller(0))[3] . ": return = $status\n"); + + return $result; +} + + +############################################################################### +# +# Execute Command Shell procedure on a target and return standard output +# +############################################################################### +sub execute +{ + my $status = TE_ERR_NONE; + my $result = ''; + + @_ = TE::Utility::clear_array(@_); + + TE::Utility::debug((caller(0))[3] . ":\n{\n" . join("\n", @_) . "\n}\n"); + set_error(TE_ERR_NONE); + + TE::Progress::update($_common->{host}, 'Executing shell command ...'); + + my (@commands) = @_; + + foreach (@commands) + { + next if ($_ eq ''); + last if (get_error()); + + my $cmd = $_; + my @outputs = (); + + TE::Progress::update(undef, $cmd); + + # Execute script + # which means $cmd will 'pipe' its output to SHELL. That means SHELL can be used + # to read the output of the command (specifically the stuff the command sends to STDOUT). + if ($$TARGET =~ m/^\//) { + # invoke command locally for UNIX sockets + } elsif ($$TARGET =~ m/:/) { + # tell ssh to use IPv6 address + $cmd = "ssh -6 $$TARGET " . $cmd; + } else { + $cmd = "ssh $$TARGET " . $cmd; + } + eval { open SHELL, "$cmd 2>&1 |" or die $! }; + my $eval_err = $@; + if ( !get_error() && $eval_err ) + { + set_error(TE_ERR_UNKNOWN, "Current command \'$cmd\': $eval_err"); + TE::Utility::error(); + TE::Utility::force_error(); + } + + # Form result + if (!get_error()) + { + while () + { + last if (get_error()); + + push @outputs, $_ if defined($_); + + TE::Progress::update(undef, $_); + } + } + + close SHELL; + + # Form result + $result .= join("", @outputs); + + TE::Utility::dump("IN:\n$cmd\nOUT:\n@{[join(\"\", @outputs)]}\n"); + } + + $status = get_error(); + TE::Utility::debug((caller(0))[3] . ": return = $status\n"); + + return $result; +} + + +############################################################################### +# +# Send message to output +# display string on the terminal and in log-file. There are several +# supported special categories such as 'fatal', 'error', 'trace' and 'debug'. +# Category 'fatal' supports setting customer error code. +# +############################################################################### +sub message +{ + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { # Do nothing + return; + } + elsif (@_ == 1) + { # Output message string as is + TE::Utility::outlog( -terminal=>1, -file=>1, $_[0] ) if (defined($_[0])); + } + else + { # Process by category + if ( $_[0] =~ /^fatal/i ) + { + # Pass message and user defined return code + if ( defined($_[2]) ) + { + TE::Utility::fatal( $_[1], $_[2] ); + } + else + { + TE::Utility::fatal( $_[1] ); + } + } + elsif ( $_[0] =~ /^error/i ) + { + # Set error code + set_error( TE_ERR_CUSTOM, $_[1] ); + + # Display message + TE::Utility::error( $_[1] ); + + # Follow special error behaviour + #TE::Utility::force_error(); + } + elsif ( $_[0] =~ /^trace/i ) + { + TE::Utility::trace( $_[1] ); + } + elsif ( $_[0] =~ /^debug/i ) + { + TE::Utility::debug( $_[1] ); + } + elsif ( $_[0] =~ /^dump/i ) + { + TE::Utility::dump( $_[1] ); + } + else + { + TE::Utility::outlog( -terminal=>1, -file=>1, @_ ); + } + } +} + + +########################################################### +# Services (following subroutine are based on primary funclets) +########################################################### +sub progress +{ + TE::Progress::update($_common->{host}, @_); + sleep(1); +} + +sub fail +{ + message("fatal", @_); +} + +sub error +{ + message("error", @_); +} + +sub die_error +{ + message("error", @_); + + # Clean status line to prevent log corruption + TE::Progress::clean(); + + # Do die to use capacity of eval operation and switch to process next target + # pressure die message to display internal errors + die "\n"; +} + + +sub execute_nowait +{ + execute(-timeout => -1, @_); +} + + +1; diff --git a/contrib/verifier/lib/TE/Progress.pm b/contrib/verifier/lib/TE/Progress.pm new file mode 100644 index 000000000..208854473 --- /dev/null +++ b/contrib/verifier/lib/TE/Progress.pm @@ -0,0 +1,99 @@ +## +# @file Progress.pm +# +# @brief TE module for Progress object. +# +# + +## @class +# Container for Progress object. +package TE::Progress; + +use strict; +use warnings; + +# External modules + +# Own modules + + +our $object = undef; + +sub init +{ + # Set default values + $object->{_fh} = \*STDERR, + $object->{_counter} = 0; + $object->{_icons} = ['-', '\\', '|', '/']; + $object->{_line} = undef; + $object->{_fields} = (); + $object->{_width} = 80; +} + +sub update +{ + # Check if it is initialized + return if (not defined($object)); + + my $status_line = undef; + my ($node_field, $status_field) = @_; + my $icon_field = $object->{_icons}->[$object->{_counter} % scalar(@{$object->{_icons}})]; + + $status_field = (defined($object->{_fields}->[2]) ? $object->{_fields}->[2] : '') if (not defined($status_field)); + $status_field = $1 if ($status_field =~ /([^\n\r]+)/); + $status_field = (defined($object->{_fields}->[2]) ? $object->{_fields}->[2] : '') if ($status_field =~ /^([\n\r]+)/); + $status_field = (defined($object->{_fields}->[2]) ? $object->{_fields}->[2] : '') if ($status_field eq ''); + + $node_field = (defined($object->{_fields}->[1]) ? $object->{_fields}->[1] : '') if (not defined($node_field)); + + $status_line = sprintf("%s(%-1.1s)%s %s[%-30.30s]%s %s%-40.40s%s\r", + ($^O =~ /Win/ ? "" : "\e[33m"), + $icon_field, + ($^O =~ /Win/ ? "" : "\e[0m"), + ($^O =~ /Win/ ? "" : "\e[32m"), + $node_field, + ($^O =~ /Win/ ? "" : "\e[0m"), + ($^O =~ /Win/ ? "" : "\e[0m"), + $status_field, + ($^O =~ /Win/ ? "" : "\e[0m")); + + $object->{_counter} ++; + $object->{_line} = $status_line; + $object->{_fields}->[0] = $icon_field; + $object->{_fields}->[1] = $node_field; + $object->{_fields}->[2] = $status_field; + + printf ${$object->{_fh}} ("%s\r", $status_line) if defined($status_line); +} + + +sub clean +{ + # Check if it is initialized + return if (not defined($object)); + + # Clean status line + my $status_line = (" " x $object->{_width}) . ("\b" x $object->{_width}) if defined($object->{_line}); + + $object->{_line} = $status_line; + + printf ${$object->{_fh}} ("%s\r", $status_line) if defined($status_line); +} + + +sub end +{ + # Check if it is initialized + return if (not defined($object)); + + # Clean status line + my $status_line = (" " x $object->{_width}) . ("\b" x $object->{_width}) if defined($object->{_line}); + + printf ${$object->{_fh}} ("%s\r", $status_line) if defined($status_line); + + $object = (); + $object = undef; +} + + +1; diff --git a/contrib/verifier/lib/TE/Utility.pm b/contrib/verifier/lib/TE/Utility.pm new file mode 100644 index 000000000..18251311b --- /dev/null +++ b/contrib/verifier/lib/TE/Utility.pm @@ -0,0 +1,586 @@ +## +# @file Utility.pm +# +# @brief TE module for different auxiliary functions. +# +# + +## @class +# Container for auxiliary functions. +package TE::Utility; + +use strict; +use warnings; +use vars qw(@EXPORT); +use base qw(Exporter); +@EXPORT = qw +( +te_def_pre_proc +te_def_server_proc +te_def_client_proc +te_def_result_proc +te_def_post_proc +te_create_feed_file +); + + +# External modules +use Sys::Hostname; +use Socket; + +# Own modules +use TE::Common; +use TE::Funclet; + + +# Define reference to the common global structure +my $_options = $TE::Common::conf->{options}; +my $_common = $TE::Common::conf->{common}; +my $_current = $TE::Common::conf->{current}; + +my @passwords; + +sub add_password +{ + my ($pw) = @_; + push @passwords, $pw; +} + + +sub get_ip +{ + my $host = ( @_ > 0 ? "@_" : ''); + + my($err, @addrs) = Socket::getaddrinfo($host, 0, {}); + if ($err) { + return $host; + } + + for my $addr (@addrs) { + my ($err, $ip) = Socket::getnameinfo($addr->{addr}, Socket::NI_NUMERICHOST); + if (!$err) { + return $ip; + } + } + return $host; +} + +sub clear_array +{ + return grep(defined, @_); +} + + +sub force_error +{ + my $code = get_error(); + + if ( $code != TE_ERR_NONE ) + { + # Clean status line to prevent log corruption + TE::Progress::clean(); + + # Do die to use capacity of eval operation and switch to process next target + # pressure die message to display internal errors + die "\n"; + } +} + + +sub outlog +{ + my $str = ''; + my $file_log = $_common->{flog}; + my $file_scr = $_common->{fdump}; + + my @arg = (); + my %args = (scalar(@_) % 2 ? (@_,undef) : @_) ; + my $argv = join(' , ', @_); + + my $opt_prefix = ''; + my $opt_terminal = 0; + my $opt_file = 0; + if (exists($args{'-prefix'})) + { + $opt_prefix = $args{'-prefix'}; + $argv =~ s/\-prefix\s,\s$opt_prefix\s?\,?\s?//; + } + if (exists($args{'-terminal'})) + { + $opt_terminal = $args{'-terminal'}; + $argv =~ s/\-terminal\s,\s$opt_terminal\s?\,?\s?//; + } + if (exists($args{'-file'})) + { + $opt_file = $args{'-file'}; + $argv =~ s/\-file\s,\s$opt_file\s?\,?\s?//; + } + if (!scalar(@arg)) + { + @arg = split(' , ', $argv); + } + + $str = "@arg"; + + if ($_options->{format_log}) + { + my $temp = ($_options->{format_log} == 1 ? $_current->{target} : $TE::Common::alias ); + $str = "${temp}: ${opt_prefix}$str"; + $str =~ s/[\n\r]$//; + $str =~ s/[\n\r]/\n${temp}\: ${opt_prefix}/g; + $str.="\n"; + } + + # Clean status line to prevent log corruption + TE::Progress::clean(); + + # Save message into log-file + if (defined($file_log) && $opt_file) + { + my $line = $str; + if (scalar(@passwords)) + { + foreach my $pw (@passwords) + { + $line =~ s/$pw/topsecret/g; + } + } + print $file_log $line; + } + + # Save message into dump-file + if (defined($file_scr) && $opt_terminal) + { + my $line = $str; + if (scalar(@passwords)) + { + foreach my $pw (@passwords) + { + $line =~ s/$pw/topsecret/g; + } + } + print $file_scr $line; + } + + # Display message on terminal + print $str if (($_options->{silent} == 0) && $opt_terminal); + + # Restore status line + TE::Progress::update(undef, "@arg"); +} + + +sub fatal +{ + my $out_level = ($_options->{out_level} >= 0 ? 1 : 0); + my $log_level = ($_options->{log_level} >= 0 ? 1 : 0); + + if ($out_level || $log_level) + { + my $str = "@_"; + + outlog(-prefix=>'fatal: ', -terminal=>$out_level, -file=>$log_level, $str); + + # Clean status line in case fatal error only + TE::Progress::clean(); + + # default fatal code + my $rc = TE_ERR_FATAL; + + # user defined code + $rc = $_[1] if (defined($_[1])); + + # last error code + $rc = get_error() if (get_error()); + + exit($rc); + } +} + + +sub error +{ + my $out_level = ($_options->{out_level} >= 1 ? 1 : 0); + my $log_level = ($_options->{log_level} >= 1 ? 1 : 0); + + if ($out_level || $log_level) + { + my $code = get_error(); + my $str = ( @_ == 0 ? get_error($code) : "@_" ); + + outlog(-prefix=>'error: ', -terminal=>$out_level, -file=>$log_level, $str); + } +} + + +sub trace +{ + my $out_level = ($_options->{out_level} >= 2 ? 1 : 0); + my $log_level = ($_options->{log_level} >= 2 ? 1 : 0); + + if ($out_level || $log_level) + { + my $str = "@_"; + + outlog(-prefix=>'trace: ', -terminal=>$out_level, -file=>$log_level, $str); + } +} + + +sub dump +{ + my $out_level = ($_options->{out_level} >= 3 ? 1 : 0); + my $log_level = ($_options->{log_level} >= 3 ? 1 : 0); + + if ($out_level || $log_level) + { + my $str = "@_"; + + outlog(-prefix=>'dump: ', -terminal=>$out_level, -file=>$log_level, $str); + } +} + + +sub debug +{ + my $out_level = ($_options->{out_level} >= 4 ? 1 : 0); + my $log_level = ($_options->{log_level} >= 4 ? 1 : 0); + + if ($out_level || $log_level) + { + my $str = "@_"; + + outlog(-prefix=>'debug: ', -terminal=>$out_level, -file=>$log_level, $str); + } +} + + +sub te_create_playback_file +{ + my @arg = (); + my %args = (scalar(@_) % 2 ? (@_,undef) : @_) ; + my $argv = join(' , ', @_); + + my $opt_base = 1.000000; + my $opt_size = 0; + my $opt_step = 0.000005; + my $opt_msg = 12; + if (exists($args{'-base'})) + { + $opt_base = $args{'-base'}; + $argv =~ s/\-base\s,\s$opt_base\s?\,?\s?//; + } + if (exists($args{'-size'})) + { + $opt_size = $args{'-size'}; + $argv =~ s/\-size\s,\s$opt_size\s?\,?\s?//; + } + if (exists($args{'-step'})) + { + $opt_step = $args{'-step'}; + $argv =~ s/\-step\s,\s$opt_step\s?\,?\s?//; + } + if (exists($args{'-msg'})) + { + $opt_msg = $args{'-msg'}; + $argv =~ s/\-msg\s,\s$opt_msg\s?\,?\s?//; + } + if (!scalar(@arg)) + { + @arg = split(' , ', $argv); + } + + TE::Utility::debug((caller(0))[3] . ":\n{\n" . join("\n", @_) . "\n}\n"); + TE::Utility::debug((caller(0))[3] . ":\nBase: $opt_base Size: $opt_size Step: $opt_step Msg: $opt_msg\n"); + + my $line = ''; + my $fpb = undef; + my $pb_file = File::Spec->rel2abs('.'); + $pb_file .= '/' . ${TE::Common::alias} . '_pb_file_' . $$; + + # Create feed file + open($fpb, "> $pb_file") || + TE::Utility::fatal("Can't open $pb_file: $!\n") if defined($pb_file); + + TE::Utility::dump("PLAYBACK FILE : $pb_file\n"); + TE::Utility::dump("-" x 20 . "\n"); + for (my $i = 0; $i < $opt_size; $i++) + { + $line = ""; + $line .= sprintf("%0.9f, %d\n", $opt_base + $i * $opt_step, $opt_msg); + + print $fpb $line; + TE::Utility::dump($line); + } + TE::Utility::dump("-" x 20 . "\n"); + + close($fpb); + + return $pb_file; +} + + +sub te_create_feed_file +{ + my @arg = (); + my %args = (scalar(@_) % 2 ? (@_,undef) : @_) ; + my $argv = join(' , ', @_); + + my $opt_protocol = 'UDP'; + my $opt_size = 0; + my $opt_addr = get_ip($_current->{target}); + my $opt_port = 7000; + my $opt_step = 1; # step of port number + if (exists($args{'-protocol'})) + { + $opt_protocol = $args{'-protocol'}; + $argv =~ s/\-protocol\s,\s$opt_protocol\s?\,?\s?//; + } + if (exists($args{'-size'})) + { + $opt_size = $args{'-size'}; + $argv =~ s/\-size\s,\s$opt_size\s?\,?\s?//; + } + if (exists($args{'-addr'})) + { + $opt_addr = get_ip($args{'-addr'}); + $argv =~ s/\-addr\s,\s$opt_addr\s?\,?\s?//; + } + if (exists($args{'-port'})) + { + $opt_port = $args{'-port'}; + $argv =~ s/\-port\s,\s$opt_port\s?\,?\s?//; + } + if (!scalar(@arg)) + { + @arg = split(' , ', $argv); + } + + TE::Utility::debug((caller(0))[3] . ":\n{\n" . join("\n", @_) . "\n}\n"); + TE::Utility::debug((caller(0))[3] . ":\nProtocol: $opt_protocol Addr: $opt_addr Port: $opt_port Size: $opt_size\n"); + + my $line = ''; + my $ffeed = undef; + my $feed_file = File::Spec->rel2abs('.'); + $feed_file .= '/' . ${TE::Common::alias} . '_feed_file_' . $$; + + # Create feed file + open($ffeed, "> $feed_file") || + TE::Utility::fatal("Can't open $feed_file: $!\n") if defined($feed_file); + + my ($group1,$group2,$group3,$group4); + if ($opt_addr !~ m/:/) { + # parse only IPv4 addresses + ($group1,$group2,$group3,$group4) = ( $opt_addr =~ /^(\d+).(\d+).(\d+).(\d+)$/i); + } + $opt_step = 0 if (!$opt_port); + $opt_port = 17000 if (!$opt_port); + my $port = $opt_port; + + TE::Utility::dump("FEED FILE : $feed_file\n"); + TE::Utility::dump("-" x 20 . "\n"); + for (my $i = $opt_port; $i < ($opt_port + $opt_size); $i++) + { + $line = ""; + if ($opt_protocol eq 'TCP') { + $line .= 'T:' + } else { + $line .= 'U:' + } + if ($opt_addr =~ m/^\//) { + $line .= "$opt_addr"; + $line .= "_$port\n"; + } elsif ($opt_addr !~ m/:/) { + $line .= "$group1"; + $line .= ".$group2"; + if ($group1 == 224 && $group4 > 254) + { + $group3++; + $group4 = 3; + } + $line .= ".$group3"; + if ($group1 == 224) + { + $group4++; + } + $line .= ".$group4"; + } else { + # IPv6 multicast is not yet supported + $line .= "[$opt_addr]" + } + + $line .= ":$port\n"; + $port+=$opt_step; + + print $ffeed $line; + TE::Utility::dump($line); + } + TE::Utility::dump("-" x 20 . "\n"); + + close($ffeed); + + return $feed_file; +} + + +sub te_def_server_proc +{ + my $status = 0; + my $result = undef; + @_ = TE::Utility::clear_array(@_); + + if (@_ > 0) + { + my $cmd = ""; + $cmd .= "env $_common->{app_env}" if exists($_common->{app_env}) && defined($_common->{app_env}); + $cmd .= " $_common->{app_path}\/$_common->{app} "; + $cmd .= join(' ', @_); + $cmd .= " $_common->{app_arg} " if exists($_common->{app_arg}) && defined($_common->{app_arg}); + $cmd =~ s/TARGET\(\)/$_current->{target}/; + if ($cmd =~ /FEED\(.*\)/) + { + my ($group1,$group2,$group3,$group4) = ( $cmd =~ /FEED\((TCP|UDP):(.*):(\d+):(\d+)\)/); + my $feed_file = te_create_feed_file(-protocol=>$group1, -addr=>$group2, -port=>$group3, -size=>$group4); + $cmd =~ s/FEED\(.*\)/$feed_file/; + } + + $result = TE::Funclet::execute($cmd); + } + + return [$status, $result]; +} + + +sub te_def_client_proc +{ + my $status = 0; + my $result = undef; + @_ = TE::Utility::clear_array(@_); + + if (@_ > 0) + { + my $cmd = ""; + $cmd .= "env $_common->{app_env}" if exists($_common->{app_env}) && defined($_common->{app_env}); + $cmd .= " $_common->{app_path}\/$_common->{app} "; + $cmd .= join(' ', @_); + $cmd .= " $_common->{app_arg} " if exists($_common->{app_arg}) && defined($_common->{app_arg}); + $cmd =~ s/TARGET\(\)/$_current->{target}/; + if ($cmd =~ /FEED\(.*\)/) + { + my ($group1,$group2,$group3,$group4) = ( $cmd =~ /FEED\((TCP|UDP):(.*):(\d+):(\d+)\)/); + my $feed_file = te_create_feed_file(-protocol=>$group1, -addr=>$group2, -port=>$group3, -size=>$group4); + $cmd =~ s/FEED\(.*\)/$feed_file/; + } + if ($cmd =~ /PLAYBACK\(.*\)/) + { + my ($group1,$group2,$group3,$group4) = ( $cmd =~ /PLAYBACK\(([\d\.]+):([\d\.]+):(\d+):(\d+)\)/); + my $pb_file = te_create_playback_file(-base=>$group1, -step=>$group2, -msg=>$group3, -size=>$group4); + $cmd =~ s/PLAYBACK\(.*\)/$pb_file/; + } + + $result = TE::Funclet::shell($cmd); + } + + return ($status, $result); +} + + +sub te_def_result_proc +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + + if ( $status == 0 && + $server_output ne '' && + (exists($arg->{server}->{success}) && defined($arg->{server}->{success})) ) + { + my @match_list = @{$arg->{server}->{success}}; + foreach my $match (@match_list) + { + if ( $server_output !~ /$match/) + { + $status = 1; + last; + } + } + } + + if ( $status == 0 && + $server_output ne '' && + (exists($arg->{server}->{failure}) && defined($arg->{server}->{failure})) ) + { + my @match_list = @{$arg->{server}->{failure}}; + foreach my $match (@match_list) + { + if ( $server_output =~ /$match/) + { + $status = 1; + last; + } + } + } + + if ( $status == 0 && + $client_output ne '' && + (exists($arg->{client}->{success}) && defined($arg->{client}->{success})) ) + { + my @match_list = @{$arg->{client}->{success}}; + foreach my $match (@match_list) + { + if ( $client_output !~ /$match/) + { + $status = 1; + last; + } + } + } + + if ( $status == 0 && + $client_output ne '' && + (exists($arg->{client}->{failure}) && defined($arg->{client}->{failure})) ) + { + my @match_list = @{$arg->{client}->{failure}}; + foreach my $match (@match_list) + { + if ( $client_output =~ /$match/) + { + $status = 1; + last; + } + } + } + } + + return ($status); +} + + +sub te_def_pre_proc +{ + TE::Funclet::shell("killall $_common->{app}"); + TE::Funclet::execute("killall $_common->{app}"); +} + + +sub te_def_post_proc +{ + TE::Funclet::shell("pkill -SIGINT $_common->{app}"); + TE::Funclet::execute("pkill -SIGINT $_common->{app}"); +} + + +1; diff --git a/contrib/verifier/lib/TE/VERSION.pm b/contrib/verifier/lib/TE/VERSION.pm new file mode 100644 index 000000000..daceaaeba --- /dev/null +++ b/contrib/verifier/lib/TE/VERSION.pm @@ -0,0 +1 @@ +our ($VERSION) = "0.1."; \ No newline at end of file diff --git a/contrib/verifier/lib/TPB.pm b/contrib/verifier/lib/TPB.pm new file mode 100644 index 000000000..afdf2f50e --- /dev/null +++ b/contrib/verifier/lib/TPB.pm @@ -0,0 +1,48 @@ +## +# @file TPB.pm +# +# @brief Test Suite TCP playback. +# +# + +## @class +# Container for common data. +package TPB; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_tcp_pb = + [ + { + name => 'tc1', + note => '#1 - playback w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pb -i TARGET() --tcp --data-file=PLAYBACK(1.000000:0.000005:12:1000)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'Total 1000 messages received'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'SentMessages=1000'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + ]; + + +1; diff --git a/contrib/verifier/lib/TPP.pm b/contrib/verifier/lib/TPP.pm new file mode 100644 index 000000000..69d3e0afb --- /dev/null +++ b/contrib/verifier/lib/TPP.pm @@ -0,0 +1,976 @@ +## +# @file TPP.pm +# +# @brief Test Suite TCP ping-pong. +# +# + +## @class +# Container for common data. +package TPP; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_tcp_pp = + [ + { + name => 'tc1', + note => '#1 - ping-pong w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'Warmup stage \(sending a few dummy messages\)...'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - ping-pong option --dontwarmup', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp --dontwarmup', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down', 'Warmup stage \(sending a few dummy messages\)...'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - ping-pong option -b10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 10 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - ping-pong option -b100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 100 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - ping-pong option -b1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -b1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 1000 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - ping-pong option -t10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -t10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(9\.|10)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - ping-pong option -t30', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -t30', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(29\.|30)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - ping-pong option -m32', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - ping-pong option -m4096', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - ping-pong option -m65500', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -m65500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - ping-pong option -r10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - ping-pong option -r100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - ping-pong option -r1024', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#14 - ping-pong option -f (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10)', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:10)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc15', + note => '#15 - ping-pong option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc16', + note => '#16 - ping-pong option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc17', + note => '#17 - ping-pong option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc18', + note => '#18 - ping-pong option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc19', + note => '#19 - ping-pong option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc20', + note => '#20 - ping-pong option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc21', + note => '#21 - ping-pong option -f -Fs --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F s --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:3) -F s --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc22', + note => '#22 - ping-pong option -f -Fp --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F p --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:3) -F p --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc23', + note => '#23 - ping-pong option -f -Fe --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F e --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:3) -F e --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc24', + note => '#24 - ping-pong option -f -Fs --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F s --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:3) -F s --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc25', + note => '#25 - ping-pong option -f -Fp --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F p --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:3) -F p --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc26', + note => '#26 - ping-pong option -f -Fe --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F e --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:3) -F e --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc27', + note => '#27 - ping-pong option -f -Fs --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F s --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc28', + note => '#28 - ping-pong option -f -Fp --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F p --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc29', + note => '#29 - ping-pong option -f -Fe --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F e --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc30', + note => '#30 - ping-pong option -f -Fs --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F s --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc31', + note => '#31 - ping-pong option -f -Fp --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F p --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc32', + note => '#32 - ping-pong option -f -Fe --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F e --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc33', + note => '#33 - ping-pong option -f -Fs --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc34', + note => '#34 - ping-pong option -f -Fp --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F p --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc35', + note => '#35 - ping-pong option -f -Fe --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F e --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc36', + note => '#36 - ping-pong -f -Fs (10 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():0:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc37', + note => '#37 - ping-pong -f -Fp (10 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():0:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc38', + note => '#38 - ping-pong -f -Fe (10 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():0:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc39', + note => '#39 - ping-pong -f -Fs (300 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():0:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc40', + note => '#40 - ping-pong -f -Fp (300 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():0:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc41', + note => '#41 - ping-pong -f -Fe (300 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():0:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc42', + note => '#42 - ping-pong option --pps=10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp --pps=10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc43', + note => '#43 - ping-pong option --pps=1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp --pps=1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc44', + note => '#44 - ping-pong option --pps=100000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp --pps=100000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc45', + note => '#45 - ping-pong unicast option -f -Fs -t20 -m50000 -r512 --threads-num=100 --data-integrity', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:500) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(TCP:TARGET():17000:500) -F s -t20 -m50000 -r512 --data-integrity', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + + +1; diff --git a/contrib/verifier/lib/TTP.pm b/contrib/verifier/lib/TTP.pm new file mode 100644 index 000000000..3a5d70dda --- /dev/null +++ b/contrib/verifier/lib/TTP.pm @@ -0,0 +1,827 @@ +## +# @file TTP.pm +# +# @brief Test Suite TCP throughput. +# +# + +## @class +# Container for common data. +package TTP; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_tcp_tp = + [ + { + name => 'tc1', + note => '#1 - throughput w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'Warmup stage \(sending a few dummy messages\)...'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - throughput option --dontwarmup', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp --dontwarmup', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down', 'Warmup stage \(sending a few dummy messages\)...'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - throughput option -b10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - throughput option -b100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - throughput option -b1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -b1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - throughput option -t10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -t10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - throughput option -t30', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -t30', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - throughput option -m32', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - throughput option -m4096', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - throughput option -m65500', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -m65500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - throughput option -r10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - throughput option -r100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - throughput option -r1024', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#14 - throughput option -f (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10)', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:10)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc15', + note => '#15 - throughput option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc16', + note => '#16 - throughput option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc17', + note => '#17 - throughput option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc18', + note => '#18 - throughput option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc19', + note => '#19 - throughput option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc20', + note => '#20 - throughput option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc21', + note => '#21 - throughput option -f -Fs --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F s --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:3) -F s --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc22', + note => '#22 - throughput option -f -Fp --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F p --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:3) -F p --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc23', + note => '#23 - throughput option -f -Fe --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F e --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:3) -F e --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc24', + note => '#24 - throughput option -f -Fs --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F s --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:3) -F s --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc25', + note => '#25 - throughput option -f -Fp --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F p --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:3) -F p --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc26', + note => '#26 - throughput option -f -Fe --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F e --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:3) -F e --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc27', + note => '#27 - throughput option -f -Fs --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F s --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc28', + note => '#28 - throughput option -f -Fp --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F p --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc29', + note => '#29 - throughput option -f -Fe --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F e --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc30', + note => '#30 - throughput option -f -Fs --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F s --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc31', + note => '#31 - throughput option -f -Fp --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F p --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc32', + note => '#32 - throughput option -f -Fe --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F e --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc33', + note => '#33 - throughput option -f -Fs --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc34', + note => '#34 - throughput option -f -Fp --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F p --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc35', + note => '#35 - throughput option -f -Fe --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F e --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc36', + note => '#36 - throughput option --tcp --pps=1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --tcp --pps=1000', + result_proc => \&te_ttp_result_proc1, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + +sub te_ttp_result_proc1 +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + $status = te_def_result_proc(@_); + + if ($status == 0) + { + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + if ( $status == 0 && + $client_output ne '' ) + { + my $sent_msg = 0; + if ($client_output =~ m/Message Rate is (\d+) \[msg\/sec\]/) { + $sent_msg = $1; + if ( not (grep($_ == $sent_msg, (1000..1002))) ) { + $status = 1; + } + } + else { + $status = 1; + } + } + } + } + + return ($status); +} + +1; diff --git a/contrib/verifier/lib/TUL.pm b/contrib/verifier/lib/TUL.pm new file mode 100644 index 000000000..955880349 --- /dev/null +++ b/contrib/verifier/lib/TUL.pm @@ -0,0 +1,1093 @@ +## +# @file TUL.pm +# +# @brief Test Suite TCP under-load. +# +# + +## @class +# Container for common data. +package TUL; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_tcp_ul = + [ + { + name => 'tc1', + note => '#1 - under-load w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'Warmup stage \(sending a few dummy messages\)...'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - under-load option --dontwarmup', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp --dontwarmup', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down', 'Warmup stage \(sending a few dummy messages\)...'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - under-load option -b10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 10 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - under-load option -b100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 100 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - under-load option -b1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -b1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 1000 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - under-load option -t10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -t10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(9\.|10)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - under-load option -t30', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -t30', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(29\.|30)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - under-load option -m32', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - under-load option -m4096', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - under-load option -m65500', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -m65500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - under-load option -r10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - under-load option -r100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - under-load option -r1024', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#14 - under-load option -f (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10)', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:10)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc15', + note => '#15 - under-load option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc16', + note => '#16 - under-load option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc17', + note => '#17 - under-load option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc18', + note => '#18 - under-load option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc19', + note => '#19 - under-load option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc20', + note => '#20 - under-load option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc21', + note => '#21 - under-load option -f -Fs --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F s --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:3) -F s --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc22', + note => '#22 - under-load option -f -Fp --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F p --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:3) -F p --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc23', + note => '#23 - under-load option -f -Fe --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F e --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:3) -F e --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc24', + note => '#24 - under-load option -f -Fs --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F s --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:3) -F s --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc25', + note => '#25 - under-load option -f -Fp --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F p --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:3) -F p --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc26', + note => '#26 - under-load option -f -Fe --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:3) -F e --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:3) -F e --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc27', + note => '#27 - under-load option -f -Fs --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F s --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc28', + note => '#28 - under-load option -f -Fp --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F p --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc29', + note => '#29 - under-load option -f -Fe --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:2) -F e --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc30', + note => '#30 - under-load option -f -Fs --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F s --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc31', + note => '#31 - under-load option -f -Fp --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F p --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc32', + note => '#32 - under-load option -f -Fe --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:20) -F e --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc33', + note => '#33 - under-load option -f -Fs --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc34', + note => '#34 - under-load option -f -Fp --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F p --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc35', + note => '#35 - under-load option -f -Fe --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():17000:400) -F e --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc36', + note => '#36 - under-load -f -Fs (10 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():0:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc37', + note => '#37 - under-load -f -Fp (10 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():0:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc38', + note => '#38 - under-load -f -Fe (10 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():0:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc39', + note => '#39 - under-load -f -Fs (300 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():0:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc40', + note => '#40 - under-load -f -Fp (300 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():0:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc41', + note => '#41 - under-load -f -Fe (300 records the same addr:port)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(TCP:TARGET():0:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(TCP:TARGET():0:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc42', + note => '#42 - under-load option --pps=10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp --pps=10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'No messages were received from the server'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc43', + note => '#43 - under-load option --pps=1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp --pps=1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc44', + note => '#44 - under-load option --pps=100000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp --pps=100000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc45', + note => '#45 - under-load option --pps=100 --reply-every=100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp --pps=100 --reply-every=100', + result_proc => \&te_tul_result_proc1, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Test end before test start'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc46', + note => '#46 - under-load option --pps=1000 --reply-every=10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --tcp --pps=1000 --reply-every=10', + result_proc => \&te_tul_result_proc2, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + +sub te_tul_result_proc1 +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + $status = te_def_result_proc(@_); + + if ($status == 0) + { + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + if ( $status == 0 && + $client_output ne '' ) + { + my $sent_msg = 0; + my $recv_msg = 0; + if ($client_output =~ m/SentMessages=(\d+)/) { + $sent_msg = $1; + if ($client_output =~ m/ReceivedMessages=(\d+)/) { + $recv_msg = $1; + if ( not (grep($_ == $sent_msg, (90..120)) && grep($_ == $recv_msg, (1..2))) ) { + $status = 1; + } + } + else { + $status = 1; + } + } + else { + $status = 1; + } + } + } + } + + return ($status); +} + +sub te_tul_result_proc2 +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + $status = te_def_result_proc(@_); + + if ($status == 0) + { + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + if ( $status == 0 && + $client_output ne '' ) + { + my $sent_msg = 0; + my $recv_msg = 0; + if ($client_output =~ m/SentMessages=(\d+)/) { + $sent_msg = $1; + if ($client_output =~ m/ReceivedMessages=(\d+)/) { + $recv_msg = $1; + if ( not (grep($_ == $sent_msg, (990..1200)) && grep($_ == $recv_msg, (98..120))) ) { + $status = 1; + } + } + else { + $status = 1; + } + } + else { + $status = 1; + } + } + } + } + + return ($status); +} + +1; diff --git a/contrib/verifier/lib/UDS.pm b/contrib/verifier/lib/UDS.pm new file mode 100644 index 000000000..c8d9af9f1 --- /dev/null +++ b/contrib/verifier/lib/UDS.pm @@ -0,0 +1,321 @@ +## +# @file UDS.pm +# +# @brief Test Suite Unix Domain Socket. +# +# + +## @class +# Container for common data. +package UDS; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_uds = + [ + { + name => 'tc1', + note => '#1 - ping-pong w/o arguments (default is udp)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() ', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() ', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'Warmup stage \(sending a few dummy messages\)...', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - ping-pong option --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'Warmup stage \(sending a few dummy messages\)...', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - ping-pong option -b10 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 10 messages', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - ping-pong option -b100 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 100 messages', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - ping-pong option -b500 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -b500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 500 messages', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - ping-pong option -t10 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -t10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(9\.|10)', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - ping-pong option -t10 (udp) ', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(9\.|10)', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - ping-pong option -m32 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - ping-pong option -m4096 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - ping-pong option --m4096 (udp)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - ping-pong option -r10 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - ping-pong option -r100 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - ping-pong option -r1024 --tcp', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET() --tcp', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --tcp -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#13 - ping-pong option -r1024 (udp)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'ADDR'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + + +1; diff --git a/contrib/verifier/lib/UPB.pm b/contrib/verifier/lib/UPB.pm new file mode 100644 index 000000000..94d557219 --- /dev/null +++ b/contrib/verifier/lib/UPB.pm @@ -0,0 +1,48 @@ +## +# @file UPB.pm +# +# @brief Test Suite UDP playback. +# +# + +## @class +# Container for common data. +package UPB; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_udp_pb = + [ + { + name => 'tc1', + note => '#1 - playback w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pb -i TARGET() --data-file=PLAYBACK(1.000000:0.000005:12:1000)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'Total 1000 messages received'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'SentMessages=1000'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + ]; + + +1; diff --git a/contrib/verifier/lib/UPP.pm b/contrib/verifier/lib/UPP.pm new file mode 100644 index 000000000..3af7af1cd --- /dev/null +++ b/contrib/verifier/lib/UPP.pm @@ -0,0 +1,1019 @@ +## +# @file UPP.pm +# +# @brief Test Suite UDP ping-pong. +# +# + +## @class +# Container for common data. +package UPP; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_udp_pp = + [ + { + name => 'tc1', + note => '#1 - ping-pong w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET()', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'Warmup stage \(sending a few dummy messages\)...'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - ping-pong option --dontwarmup', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --dontwarmup', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down', 'Warmup stage \(sending a few dummy messages\)...'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - ping-pong option -b10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 10 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - ping-pong option -b100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 100 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - ping-pong option -b200', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -b200', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 200 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - ping-pong option -t10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(9\.|10)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - ping-pong option -t30', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(29\.|30)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - ping-pong option -m32', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - ping-pong option -m4096', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - ping-pong option -m65500', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -m65500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - ping-pong option -r10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - ping-pong option -r100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - ping-pong option -r1024', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#14 - ping-pong option -f (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10)', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:10)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc15', + note => '#15 - ping-pong option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc16', + note => '#16 - ping-pong option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc17', + note => '#17 - ping-pong option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc18', + note => '#18 - ping-pong option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc19', + note => '#19 - ping-pong option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc20', + note => '#20 - ping-pong option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc21', + note => '#21 - ping-pong option -f -Fs --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F s --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:3) -F s --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc22', + note => '#22 - ping-pong option -f -Fp --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F p --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:3) -F p --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc23', + note => '#23 - ping-pong option -f -Fe --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F e --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:3) -F e --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc24', + note => '#24 - ping-pong option -f -Fs --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F s --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:3) -F s --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc25', + note => '#25 - ping-pong option -f -Fp --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F p --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:3) -F p --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc26', + note => '#26 - ping-pong option -f -Fe --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F e --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:3) -F e --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc27', + note => '#27 - ping-pong option -f -Fs --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F s --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc28', + note => '#28 - ping-pong option -f -Fp --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F p --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc29', + note => '#29 - ping-pong option -f -Fe --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F e --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc30', + note => '#30 - ping-pong option -f -Fs --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F s --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc31', + note => '#31 - ping-pong option -f -Fp --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F p --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc32', + note => '#32 - ping-pong option -f -Fe --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F e --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc33', + note => '#33 - ping-pong option -f -Fs --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc34', + note => '#34 - ping-pong option -f -Fp --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F p --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc35', + note => '#35 - ping-pong option -f -Fe --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F e --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc36', + note => '#36 - ping-pong multicast option -f --mc-loopback-enable', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:10) -F s --mc-loopback-enable', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc37', + note => '#37 - ping-pong multicast option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc38', + note => '#38 - ping-pong multicast option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc39', + note => '#39 - ping-pong multicast option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc40', + note => '#40 - ping-pong multicast option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc41', + note => '#41 - ping-pong multicast option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc42', + note => '#42 - ping-pong multicast option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:7000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:7000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc43', + note => '#43 - ping-pong option --pps=10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --pps=10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc44', + note => '#44 - ping-pong option --pps=1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --pps=1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc45', + note => '#45 - ping-pong option --pps=100000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'pp -i TARGET() --pps=100000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc46', + note => '#46 - ping-pong unicast option -f -Fs -t20 -m50000 -r512 --threads-num=100 --data-integrity', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:500) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:TARGET():17000:500) -F s -t20 -m50000 -r512 --data-integrity', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc47', + note => '#47 - ping-pong multicast option -f -Fs -t20 -m50000 -r512 --threads-num=100 --data-integrity', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:500) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'pp -f FEED(UDP:224.4.0.3:17000:500) -F s -t20 -m50000 -r512 --data-integrity', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + + +1; diff --git a/contrib/verifier/lib/UTP.pm b/contrib/verifier/lib/UTP.pm new file mode 100644 index 000000000..d0b227f45 --- /dev/null +++ b/contrib/verifier/lib/UTP.pm @@ -0,0 +1,974 @@ +## +# @file UTP.pm +# +# @brief Test Suite UDP throughput. +# +# + +## @class +# Container for common data. +package UTP; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_udp_tp = + [ + { + name => 'tc1', + note => '#1 - throughput w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET()', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'Warmup stage \(sending a few dummy messages\)...'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - throughput option --dontwarmup', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --dontwarmup', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down', 'Warmup stage \(sending a few dummy messages\)...'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - throughput option -b10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - throughput option -b100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - throughput option -b1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -b1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - throughput option -t10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - throughput option -t30', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - throughput option -m32', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - throughput option -m4096', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - throughput option -m65500', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -m65500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - throughput option -r10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - throughput option -r100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - throughput option -r1024', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#14 - throughput option -f (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10)', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:10)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc15', + note => '#15 - throughput option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc16', + note => '#16 - throughput option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc17', + note => '#17 - throughput option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc18', + note => '#18 - throughput option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc19', + note => '#19 - throughput option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc20', + note => '#20 - throughput option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc21', + note => '#21 - throughput option -f -Fs --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F s --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:3) -F s --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc22', + note => '#22 - throughput option -f -Fp --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F p --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:3) -F p --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc23', + note => '#23 - throughput option -f -Fe --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F e --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:3) -F e --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc24', + note => '#24 - throughput option -f -Fs --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F s --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:3) -F s --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc25', + note => '#25 - throughput option -f -Fp --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F p --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:3) -F p --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc26', + note => '#26 - throughput option -f -Fe --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F e --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:3) -F e --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc27', + note => '#27 - throughput option -f -Fs --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F s --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc28', + note => '#28 - throughput option -f -Fp --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F p --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc29', + note => '#29 - throughput option -f -Fe --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F e --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc30', + note => '#30 - throughput option -f -Fs --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F s --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc31', + note => '#31 - throughput option -f -Fp --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F p --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc32', + note => '#32 - throughput option -f -Fe --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F e --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc33', + note => '#33 - throughput option -f -Fs --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc34', + note => '#34 - throughput option -f -Fp --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F p --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc35', + note => '#35 - throughput option -f -Fe --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F e --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc36', + note => '#36 - throughput multicast option -f --mc-loopback-enable', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:10) -F s --mc-loopback-enable', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc37', + note => '#37 - throughput multicast option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc38', + note => '#38 - throughput multicast option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc39', + note => '#39 - throughput multicast option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc40', + note => '#40 - throughput multicast option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc41', + note => '#41 - throughput multicast option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc42', + note => '#42 - throughput multicast option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'tp -f FEED(UDP:224.4.0.3:17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc43', + note => '#43 - throughput option --pps=1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'tp -i TARGET() --pps=1000', + result_proc => \&te_utp_result_proc1, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Message Rate'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + +sub te_utp_result_proc1 +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + $status = te_def_result_proc(@_); + + if ($status == 0) + { + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + if ( $status == 0 && + $client_output ne '' ) + { + my $sent_msg = 0; + if ($client_output =~ m/Message Rate is (\d+) \[msg\/sec\]/) { + $sent_msg = $1; + if ( not (grep($_ == $sent_msg, (1000..1002))) ) { + $status = 1; + } + } + else { + $status = 1; + } + } + } + } + + return ($status); +} + +1; diff --git a/contrib/verifier/lib/UUL.pm b/contrib/verifier/lib/UUL.pm new file mode 100644 index 000000000..5363a1958 --- /dev/null +++ b/contrib/verifier/lib/UUL.pm @@ -0,0 +1,1116 @@ +## +# @file UUL.pm +# +# @brief Test Suite UDP under-load. +# +# + +## @class +# Container for common data. +package UUL; + +use strict; +use warnings; + + +# Own modules +use TE::Common; +use TE::Funclet; +use TE::Utility; + + +our $test_suite_udp_ul = + [ + { + name => 'tc1', + note => '#1 - under-load w/o arguments', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET()', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'Warmup stage \(sending a few dummy messages\)...'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + }, + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc2', + note => '#2 - under-load option --dontwarmup', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --dontwarmup', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down', 'Warmup stage \(sending a few dummy messages\)...'], + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc3', + note => '#3 - under-load option -b10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -b10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 10 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc4', + note => '#4 - under-load option -b100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -b100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 100 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc5', + note => '#5 - under-load option -b1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -b1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency of burst of 1000 messages'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc6', + note => '#6 - under-load option -t10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(9\.|10)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc7', + note => '#7 - under-load option -t30', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -t60', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'RunTime=(29\.|10)'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc8', + note => '#8 - under-load option -m32', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -m32', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc9', + note => '#9 - under-load option -m4096', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -m4096', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc10', + note => '#10 - under-load option -m65500', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -m65500', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc11', + note => '#11 - under-load option -r10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -r10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc12', + note => '#12 - under-load option -r100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -r100', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc13', + note => '#13 - under-load option -r1024', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() -r1024', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc14', + note => '#14 - under-load option -f (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10)', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:10)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc15', + note => '#15 - under-load option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc16', + note => '#16 - under-load option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc17', + note => '#17 - under-load option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc18', + note => '#18 - under-load option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc19', + note => '#19 - under-load option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc20', + note => '#20 - under-load option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc21', + note => '#21 - under-load option -f -Fs --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F s --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:3) -F s --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc22', + note => '#22 - under-load option -f -Fp --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F p --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:3) -F p --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc23', + note => '#23 - under-load option -f -Fe --timeout 0', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F e --timeout 0', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:3) -F e --timeout 0', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc24', + note => '#24 - under-load option -f -Fs --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F s --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:3) -F s --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc25', + note => '#25 - under-load option -f -Fp --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F p --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:3) -F p --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc26', + note => '#26 - under-load option -f -Fe --timeout=-1', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:3) -F e --timeout=-1', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:3) -F e --timeout=-1', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc27', + note => '#27 - under-load option -f -Fs --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F s --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc28', + note => '#28 - under-load option -f -Fp --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F p --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc29', + note => '#29 - under-load option -f -Fe --threads-num=2 (one socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:2) -F e --threads-num=2', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:2)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc30', + note => '#30 - under-load option -f -Fs --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F s --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc31', + note => '#31 - under-load option -f -Fp --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F p --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc32', + note => '#32 - under-load option -f -Fe --threads-num=10 (two socket per thread)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:20) -F e --threads-num=10', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:20)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc33', + note => '#33 - under-load option -f -Fs --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F s --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc34', + note => '#34 - under-load option -f -Fp --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F p --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc35', + note => '#35 - under-load option -f -Fe --threads-num=100 (on 400 sockets)', + pre_proc => \&te_def_pre_proc, + server_wakeup => '20', + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:TARGET():17000:400) -F e --threads-num=100', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:TARGET():17000:400)', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc36', + note => '#36 - under-load multicast option -f --mc-loopback-enable', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:10) -F s --mc-loopback-enable', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc37', + note => '#37 - under-load multicast option -f -Fs (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:10) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc38', + note => '#38 - under-load multicast option -f -Fp (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:10) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc39', + note => '#39 - under-load multicast option -f -Fe (10 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:10) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:10) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc40', + note => '#40 - under-load multicast option -f -Fs (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:300) -F s', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:300) -F s', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using select()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc41', + note => '#41 - under-load multicast option -f -Fp (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:300) -F p', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:300) -F p', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using poll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc42', + note => '#42 - under-load multicast option -f -Fe (300 records)', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -f FEED(UDP:224.4.0.3:17000:300) -F e', + client_proc => \&te_def_client_proc, + client_arg => 'ul -f FEED(UDP:224.4.0.3:17000:300) -F e', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is', 'using epoll()', 'IP = 224.4.'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc43', + note => '#43 - under-load option --pps=10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --pps=10', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'No messages were received from the server'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc44', + note => '#44 - under-load option --pps=1000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --pps=1000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc45', + note => '#45 - under-load option --pps=100000', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --pps=100000', + result_proc => \&te_def_result_proc, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc46', + note => '#46 - under-load option --pps=100 --reply-every=100', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --pps=100 --reply-every=100', + result_proc => \&te_uul_result_proc1, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Test end before test start'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + { + name => 'tc47', + note => '#47 - under-load option --pps=1000 --reply-every=10', + pre_proc => \&te_def_pre_proc, + server_proc => \&te_def_server_proc, + server_arg => 'sr -i TARGET()', + client_proc => \&te_def_client_proc, + client_arg => 'ul -i TARGET() --pps=1000 --reply-every=10', + result_proc => \&te_uul_result_proc2, + result_arg => { + server => { + success => ['Test end', 'interrupted by', 'exit'], + failure => ['Segmentation fault', 'Assertion', 'ERROR'] + }, + client => { + success => ['Test ended', 'Summary: Latency is'], + failure => ['Segmentation fault', 'Assertion', 'ERROR', 'server down'] + } + }, + post_proc => \&te_def_post_proc, + }, + ]; + + +sub te_uul_result_proc1 +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + $status = te_def_result_proc(@_); + + if ($status == 0) + { + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + if ( $status == 0 && + $client_output ne '' ) + { + my $sent_msg = 0; + my $recv_msg = 0; + if ($client_output =~ m/SentMessages=(\d+)/) { + $sent_msg = $1; + if ($client_output =~ m/ReceivedMessages=(\d+)/) { + $recv_msg = $1; + if ( not (grep($_ == $sent_msg, (90..120)) && grep($_ == $recv_msg, (1..2))) ) { + $status = 1; + } + } + else { + $status = 1; + } + } + else { + $status = 1; + } + } + } + } + + return ($status); +} + +sub te_uul_result_proc2 +{ + my $status = 0; + @_ = TE::Utility::clear_array(@_); + + if (@_ == 0) + { + $status = 1; + } + elsif (@_ > 0) + { + my ($arg) = @_; + + return ($status) if (!defined($arg)); + + $status = te_def_result_proc(@_); + + if ($status == 0) + { + my $server_output = (exists($arg->{server}->{output}) && defined($arg->{server}->{output}) ? $arg->{server}->{output} : ''); + my $client_output = (exists($arg->{client}->{output}) && defined($arg->{client}->{output}) ? $arg->{client}->{output} : ''); + + if ( $status == 0 && + $client_output ne '' ) + { + my $sent_msg = 0; + my $recv_msg = 0; + if ($client_output =~ m/SentMessages=(\d+)/) { + $sent_msg = $1; + if ($client_output =~ m/ReceivedMessages=(\d+)/) { + $recv_msg = $1; + if ( not (grep($_ == $sent_msg, (990..1200)) && grep($_ == $recv_msg, (98..120))) ) { + $status = 1; + } + } + else { + $status = 1; + } + } + else { + $status = 1; + } + } + } + } + + return ($status); +} + + +1; diff --git a/contrib/verifier/verifier.pl b/contrib/verifier/verifier.pl new file mode 100755 index 000000000..7b31ff19f --- /dev/null +++ b/contrib/verifier/verifier.pl @@ -0,0 +1,705 @@ +#!/usr/bin/env perl +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2011-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# 3. Neither the name of the Mellanox Technologies Ltd nor the names of its +# contributors may be used to endorse or promote products derived from this +# software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +# SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +# OF SUCH DAMAGE. +# + +## +# @file verifier.pl +# +# @brief SOCKPERF Verification Tool. +# @author Igor Ivanov (Igor.Ivanov.Va@gmail.com) +# + + +use strict; +use warnings; +use Cwd; +use File::Basename; + +# Add extra directories to Perl's search path as /lib with tool +# additional modules +use lib dirname($0) . "/lib"; +use lib dirname($0) . "/lib/TE"; + +use Data::Dumper; +use File::Basename; +use File::Temp; +use File::Basename; +use File::Spec; +use Sys::Hostname; + +use TE::Common; +use TE::Utility; +use TE::Funclet; + +our ($VERSION) = "0.3"; + +########################################################### +# Set variables +########################################################### +my $module_name=basename($0,".pl"); +my $module_script=basename($0); +my $module_path=File::Spec->rel2abs(dirname($0)); +my $command_line = join(" ", @ARGV); + +########################################################### +# Set Interrupt Handlers +########################################################### +$SIG{'INT'} = \&__abort; # use signal handling, if press ^C, will interrupt and call sub __abort. + + +########################################################### +# Main block +########################################################### +use Getopt::Long qw(:config no_ignore_case); + +my $opt_help; +my $opt_version; +my $opt_info; + +my $opt_app; +my @opt_target_list; +my $opt_username; +my $opt_password; +my @opt_task_list; +my $opt_app_arg; +my $opt_app_env; + +my $opt_mailto; +my $opt_silent; +my $opt_out_level; +my $opt_log_level; +my $opt_progress; +my $opt_log; +my $opt_screen_log; +my $opt_format_log; + + +GetOptions ('help|h' => \$opt_help, + 'version|v' => \$opt_version, + 'info|i' => \$opt_info, + + 'app|a=s' => \$opt_app, + 'target|s=s' => \@opt_target_list, + 'username|u=s' => \$opt_username, + 'password|p=s' => \$opt_password, + 'task|t=s' => \@opt_task_list, + 'app-arg|x=s' => \$opt_app_arg, + 'app-env|e=s' => \$opt_app_env, + + 'email|m=s' => \$opt_mailto, + 'quiet|q!' => \$opt_silent, + 'out-level|o=i' => \$opt_out_level, + 'log-level|d=i' => \$opt_log_level, + 'progress|p=i' => \$opt_progress, + 'log|l=s' => \$opt_log, + 'screen-log' => \$opt_screen_log, + 'format-log' => \$opt_format_log, + ); + +# Define reference to the common global structure +my $_options = $TE::Common::conf->{options}; +my $_common = $TE::Common::conf->{common}; +my $_current = $TE::Common::conf->{current}; + +# Set values passed from command line for some parameters +$_options->{targets} = [split(/\s*,\s*/,join(',',@opt_target_list))] if scalar(@opt_target_list); +$_options->{username} = $opt_username if defined($opt_username); +$_options->{password} = $opt_password if defined($opt_password); +$_options->{tasks} = [split(/\s*,\s*/,join(',',@opt_task_list))] if scalar(@opt_task_list); +$_options->{email} = $opt_mailto if defined($opt_mailto); +$_options->{silent} = $opt_silent if defined($opt_silent); + +$_options->{out_level} = $opt_out_level if defined($opt_out_level); +$_options->{out_level} = 0 if ($_options->{silent} == 1); + +$_options->{log_level} = $opt_log_level if defined($opt_log_level); + +$_options->{progress} = $opt_progress if defined($opt_progress); +$_options->{progress} = 0 if ($_options->{silent} == 1); +$_options->{log} = ( defined($opt_log) ? $opt_log : undef ); +$_options->{screen_log} = $opt_screen_log if defined($opt_screen_log); +$_options->{format_log} = 1 if defined($opt_format_log); + + +if ($opt_help) +{ + __help(''); + exit(TE_ERR_NONE); +} + +if ($opt_version) +{ + __version($VERSION); + exit(TE_ERR_NONE); +} + +if (defined($opt_app)) +{ + # Check if files existed + __verify_opt_file( $opt_app ); + $_common->{app} = basename($opt_app); + $_common->{app_path} = File::Spec->rel2abs(dirname($opt_app)); + $_common->{app_arg} = undef; + $_common->{app_arg} = $opt_app_arg if defined($opt_app_arg); + $_common->{app_env} = undef; + $_common->{app_env} = $opt_app_env if defined($opt_app_env); +} +$_common->{host} = hostname(); +$_common->{host_ip} = TE::Utility::get_ip($_common->{host}); + +$_current->{target} = hostname(); + +# Get command-line rest arguments and make them as external variables +# they are accessable from user script as $ENV{name} or &shell("echo \$name") +foreach (@ARGV) +{ + if ($_ =~ /([^=:]+)\=(.*)/) + { + # save arguments inside internal oject + $_options->{ext}->{$1} = $2; + + # set them as environment variables + $ENV{$1} = $2; + } +} + + +TE::Utility::debug("\n"); +TE::Utility::dump(Dumper($_options)); + + +# Process command line options +__setup_task(); +if ( defined($opt_info) || (not scalar(@opt_task_list)) ) +{ + __info_task(); +} +elsif ( scalar(@opt_task_list) ) +{ + __exec_task(); +} +else +{ + __help(''); +} + + +# Send notification by e-mail +if ( $opt_mailto ) { + + TE::Funclet::shell( "cd $module_path; tar -zcf $_options->{log_file}.tgz $_options->{log_file} $_options->{dump_file}" ); + + my @attachments = ("$_options->{log_file}.tgz"); + + TE::Utility::debug("Sending results to $opt_mailto ...\n"); + + __send_results_by_mail($_options->{email}, @attachments); +} + +# Exit with error status +exit(get_error()); + + + +########################################################### +# Define functions +########################################################### + + +############################################################################### +# +# Show help to tool +# +############################################################################### +sub __help +{ + my ($action)=@_; + + print ("Usage: $module_script [options...] [arguments...]\n"); + print ("Mellanox SOCKPERF Verification Utility -- Version: $VERSION\n\n"); + + print ("$module_script -s [ip|hostname] -a [absolute path to tool] -t [all|udp-pp|udp-pp:tc1|udp-pp:^tc1$] -l [log file name]\n\n"); + + print ("\nOptions:\n"); + printf (" %-5s %-10s\t%-s\n", '-h,', '--help', "Show the help message and exit."); + printf (" %-5s %-10s\t%-s\n", '-v,', '--version', "Output version information and exit."); + printf (" %-5s %-10s\t%-s\n", '-i', '--info', "Display detailed information about available tasks."); + + printf (" %-5s %-10s\t%-s\n", '-a,', '--app', "Application to be used."); + printf (" %-5s %-10s\t%-s\n", '-x,', '--app-arg', "Common application arguments."); + printf (" %-5s %-10s\t%-s\n", '-e,', '--app-env', "Set environment variables."); + printf (" %-5s %-10s\t%-s\n", '-s,', '--target', "List of targets."); + printf (" %-5s %-10s\t%-s\n", '-u,', '--username', "Privileged username to target (default: $_options->{username})."); + printf (" %-5s %-10s\t%-s\n", '-p,', '--password', "Password to access target (default: $_options->{password})."); + printf (" %-5s %-10s\t%-s\n", '-t,', '--task', "Test name."); + + print ("\nArguments:\n"); + + printf (" %-5s %-10s\t%-s\n", '-m,', '--email', "e-mail address to get notification."); + printf (" %-5s %-10s\t%-s\n", '-o', '--out-level', "Set terminal info level 0..4 (default: 1)."); + printf (" %-5s %-10s\t%-s\n", '-d', '--log-level', "Set log-file info level (default: 2)."); + printf (" %-5s %-10s\t%-s\n", '', '--[no-]quiet', "Don't display output on the terminal (default: --no-quiet)."); + printf (" %-5s %-10s\t%-s\n", '-p,', '--progress', "Enable/Disable status line (default: 1)."); + printf (" %-5s %-10s\t%-s\n", '-l,', '--log', "Logging file name."); + printf (" %-5s %-10s\t%-s\n", '', '--split-log', "Separate logging files by targets (default: off)."); + printf (" %-5s %-10s\t%-s\n", '', '--no-split-log', "Save output in one logging file (default: on)."); + printf (" %-5s %-10s\t%-s\n", '', '--format-log', "Enable targetname: labels on output lines"); + + exit(TE_ERR_NONE); +} + + +############################################################################### +# +# Display tool version info +# +############################################################################### +sub __version +{ + printf("$module_name %s\n", @_); + + exit(TE_ERR_NONE); +} + + +############################################################################### +# +# Display all available tasks +# Parameters: +# none - display information about all tasks on a terminal and return one as a string +# any - return information about all tasks as a string only +# +############################################################################### +sub __info_task +{ + my $output_str = ''; + + { + $output_str .= sprintf("Available tasks:\n"); + + # Calculate max length + my $max_length = 0; + foreach my $tsuite (@{$_common->{tsuite}}) + { + $max_length = length($tsuite->{name}) if ($max_length < length($tsuite->{name})); + } + + # Enumerate all sections + foreach my $tsuite (@{$_common->{tsuite}}) + { + next if grep ($_ !~ /$tsuite->{name}/, @{$_options->{tasks}}); + + $output_str .= sprintf(" %-${max_length}s - %-s\n", + $tsuite->{name}, + $tsuite->{note} ); + } + } + + print $output_str if (@_ == 0) ; + + return $output_str; +} + + +############################################################################### +# +# Setup tests +# +############################################################################### +sub __setup_task +{ + use UPP; + use TPP; + use UUL; + use TUL; + use UTP; + use TTP; + use UPB; + use TPB; + use UDS; + + $_common->{tsuite} = + [ + { + name => 'udp-pp', + tcase => $UPP::test_suite_udp_pp, + note => 'ping-pong for UDP' + }, + { + name => 'udp-ul', + tcase => $UUL::test_suite_udp_ul, + note => 'under-load for UDP' + }, + { + name => 'udp-tp', + tcase => $UTP::test_suite_udp_tp, + note => 'throughput for UDP' + }, + { + name => 'udp-pb', + tcase => $UPB::test_suite_udp_pb, + note => 'playback for UDP' + }, + { + name => 'tcp-pp', + tcase => $TPP::test_suite_tcp_pp, + note => 'ping-pong for TCP' + }, + { + name => 'tcp-ul', + tcase => $TUL::test_suite_tcp_ul, + note => 'under-load for TCP' + }, + { + name => 'tcp-tp', + tcase => $TTP::test_suite_tcp_tp, + note => 'throughput for TCP' + }, + { + name => 'tcp-pb', + tcase => $TPB::test_suite_tcp_pb, + note => 'playback for TCP' + }, + { + name => 'uds', + tcase => $UDS::test_suite_uds, + note => 'tests for Unix Domain Socket' + } + ]; +} + + +############################################################################### +# +# Execute task +# +############################################################################### +sub __exec_task +{ + my $temp_log = ${TE::Common::alias}; + $temp_log .= '-' . $_options->{task} if defined($_options->{task}); + $temp_log .= '-' . sprintf("%02d%02d%04d", + (localtime(time()))[3], + (localtime(time()))[4] + 1, + (localtime(time()))[5] + 1900); + $temp_log .= '-' . sprintf("%02d%02d%02d", + (localtime(time()))[2], + (localtime(time()))[1], + (localtime(time()))[0]); + $temp_log .= '.log'; + $_options->{log} = $temp_log if (not defined($_options->{log})); + + my $log_file = ( exists($_options->{log}) && defined($_options->{log}) ? $_options->{log} : undef ); + my($filename, $directory, $suffix) = fileparse($log_file, qr/\.[^.]*/); + my $dump_file = ( exists($_options->{screen_log}) && defined($_options->{screen_log}) ? "$filename.dump" : undef ); + + unlink $log_file if defined($log_file); + unlink $dump_file if defined($dump_file); + + $_options->{log_file} = $log_file if defined($log_file); + $_options->{dump_file} = $dump_file if defined($dump_file); + + # Launch operations on hosts + foreach (@{$_options->{targets}}) + { + $_current->{target} = $_; + + # Create file for logging + open($_common->{flog}, ">> $log_file") || + TE::Utility::fatal("Can't open $log_file: $!\n") if defined($log_file); + + # Create file for dump information if debugging is turned on + open($_common->{fdump}, ">> $dump_file") || + TE::Utility::fatal("Can't open $dump_file: $!\n") if defined($dump_file); + + # Form heading + TE::Utility::trace("\nMellanox SOCKPERF Verification Tool v$VERSION\n"); + TE::Utility::trace("**********************************\n"); + my $info_str = ''; + $info_str .= sprintf("* Options: %s\n", $command_line); + $info_str .= sprintf("* Log file: %s\n", $log_file); + $info_str .= sprintf("* Dump file: %s\n", (defined($dump_file) ? $dump_file : 'none')); + $info_str .= sprintf("* Host: %s\n", $_common->{host}); + $info_str .= sprintf("* Target: %s\n", $_current->{target}); + $info_str .= sprintf("* Output level: %s\n", $_options->{out_level}); + $info_str .= sprintf("* Log level: %s\n", $_options->{log_level}); + TE::Utility::trace($info_str); + TE::Utility::trace("**********************************\n"); + TE::Utility::trace("\n"); + + local $SIG{ALRM} = sub { + TE::Utility::fatal("ping $_current->{target} unreached. You need to interrupt application\n"); + }; + alarm 30; + { + TE::Utility::dump("\nTest Environment Settings\n"); + TE::Utility::dump("**********************************\n"); + TE::Utility::dump("HOST: $_common->{host}\n"); + $info_str = ''; + $info_str .= sprintf("* route table: %s\n", TE::Funclet::shell("route")); + $info_str .= sprintf("* interfaces: %s\n", TE::Funclet::shell("ifconfig")); + TE::Utility::dump($info_str); + TE::Utility::dump("TARGET: $_current->{target}\n"); + $info_str = ''; + $info_str .= sprintf("* route table: %s\n", TE::Funclet::execute("route")); + $info_str .= sprintf("* interfaces: %s\n", TE::Funclet::execute("ifconfig")); + TE::Utility::dump($info_str); + TE::Utility::dump("**********************************\n"); + TE::Utility::dump("\n"); + } + alarm 0; + + my $start_time = time(); + my $num_tests = 0; + my $num_passes = 0; + TE::Progress::init() if ($_options->{progress}); + + # Check if this method can be used + eval { require threads }; + if ($@) + { + VFA::Utility::fatal("threads can't be loaded.\n"); + } + use threads; + + # Launch all tasks in case task list is not defined + if (scalar(@{$_options->{tasks}}) == 1 && $_options->{tasks}->[0] eq 'all') + { + foreach (@{$_common->{tsuite}}) + { + push(@{$_options->{tasks}}, $_->{name}); + } + } + + foreach my $_task (@{$_options->{tasks}}) + { + my $i = 0; + my $j = 0; + my ($_tsuite, $_tcase) = split(/:/, $_task); + + $_current->{task} = $_; + for ($i = 0; $i < scalar(@{$_common->{tsuite}}); $i++) + { + next if (!defined($_common->{tsuite}->[$i]->{tcase})); + next if ( (defined($_tsuite)) && + ($_common->{tsuite}->[$i]->{name} !~ /$_tsuite/) ); + for ($j = 0; $j < scalar(@{$_common->{tsuite}->[$i]->{tcase}}); $j++) + { + next if ( (defined($_tcase)) && + ($_common->{tsuite}->[$i]->{tcase}->[$j]->{name} !~ /$_tcase/) ); + + my $server_output = ''; + my $client_output = ''; + my $result_code = 0; + my $task = $_common->{tsuite}->[$i]->{tcase}->[$j]; + my $thread = undef; + + TE::Utility::dump("\n"); + TE::Utility::dump("**********************************\n"); + TE::Utility::dump("* TSUITE : $_common->{tsuite}->[$i]->{name}\n"); + TE::Utility::dump("* : $_common->{tsuite}->[$i]->{note}\n") + if (defined($_common->{tsuite}->[$i]->{note})); + TE::Utility::dump("* TCASE : $_common->{tsuite}->[$i]->{tcase}->[$j]->{name}\n"); + TE::Utility::dump("* : $_common->{tsuite}->[$i]->{tcase}->[$j]->{note}\n") + if (defined($_common->{tsuite}->[$i]->{tcase}->[$j]->{note})); + TE::Utility::dump("**********************************\n"); + + # Execute task + $task->{pre_proc}() if defined($task->{pre_proc}); + if (not (defined($result_code) && $result_code)) + { + my $server_wakeup = (exists($task->{server_wakeup}) && defined($task->{server_wakeup}) ? $task->{server_wakeup} : 120); + + $thread = threads->create( + $task->{server_proc}, $task->{server_arg}) if defined($task->{server_proc}); + # Wait for server wake up + sleep($server_wakeup); + } + if (not (defined($result_code) && $result_code)) + { + local $SIG{ALRM} = sub { + TE::Funclet::shell("pkill -SIGINT $_common->{app}") + }; + alarm 1000; + ($result_code, $client_output) = $task->{client_proc}($task->{client_arg}) if defined($task->{client_proc}); + alarm 0; + } + + # Wait for server thread completion + TE::Funclet::execute("pkill -SIGINT $_common->{app}"); + if (not (defined($result_code) && $result_code)) + { + my $res= $thread->join() if defined($thread); + ($result_code, $server_output) = @$res; + } + else + { + $thread->join() if defined($thread); + } + + if (not (defined($result_code) && $result_code)) + { + $task->{result_arg}->{server}->{output} = $server_output; + $task->{result_arg}->{client}->{output} = $client_output; + $result_code = $task->{result_proc}($task->{result_arg}) if defined($task->{result_proc}); + } + $task->{post_proc}() if defined($task->{post_proc}); + + # Statistic + $num_tests++; + $num_passes++ if ( not (defined($result_code) && $result_code) ); + + # Print result line + $info_str = ''; + $info_str .= sprintf("%-6.6s %-12.12s %-12.12s %s\n", + (not (defined($result_code) && $result_code) ? 'PASS' : 'FAIL'), + $_common->{tsuite}->[$i]->{name}, + $_common->{tsuite}->[$i]->{tcase}->[$j]->{name}, + $_common->{tsuite}->[$i]->{tcase}->[$j]->{note}); + TE::Utility::trace($info_str); + TE::Utility::dump("\n**********************************\n"); + } + } + } + TE::Progress::end(); + my $finish_time = time(); + + TE::Utility::trace("\n"); + TE::Utility::trace("**********************************\n"); + $info_str = ''; + $info_str .= sprintf("* Passed: %d\n", $num_passes); + $info_str .= sprintf("* Failed: %d\n", $num_tests - $num_passes); + $info_str .= sprintf("* Total: %d\n", $num_tests); + $info_str .= sprintf("* Start time: %02d-%02d-%04d %02d:%02d:%02d\n", + (localtime($start_time))[3], + (localtime($start_time))[4] + 1, + (localtime($start_time))[5] + 1900, + (localtime($start_time))[2], + (localtime($start_time))[1], + (localtime($start_time))[0]); + $info_str .= sprintf("* Finish time: %02d-%02d-%04d %02d:%02d:%02d\n", + (localtime($finish_time))[3], + (localtime($finish_time))[4] + 1, + (localtime($finish_time))[5] + 1900, + (localtime($finish_time))[2], + (localtime($finish_time))[1], + (localtime($finish_time))[0]); + $info_str .= sprintf("* Duration: %d:%02d:%02d\n", + ($finish_time - $start_time) / 3600, + (($finish_time - $start_time) / 60) % 60, + ($finish_time - $start_time) % 60); + TE::Utility::trace($info_str); + TE::Utility::trace("**********************************\n"); + + close($_common->{flog}) if defined($_common->{flog}); + $_common->{flog} = undef; + close($_common->{fdump}) if defined($_common->{fdump}); + $_common->{fdump} = undef; + } +} + + +############################################################################### +# +# Check if files directed in command line exists +# +############################################################################### +sub __verify_opt_file +{ + my (@files)=@_; + foreach my $file (@files) + { + if( ! -e $file) + { + TE::Utility::fatal("$file doesn't exist\n"); + } + } +} + +############################################################################### +# +# Proxy-aware LWP creator +# +############################################################################### +sub __get_lwp +{ + my ($url) = @_; + + my $scheme = $url; + $scheme =~ s/^\s*(http[s]*):\/\/.*$/$1/; + # Get the proxy corresponding to the scheme + my $env_proxy = $ENV{"${scheme}_proxy"}; + + my $ua = LWP::UserAgent->new(); + return undef + if (!$ua); + + if ($env_proxy) { + # Ensure the env proxy has the scheme at the prefix + $env_proxy = "$scheme://$env_proxy" + if ($env_proxy !~ /^\s*http/); + $ua->proxy($scheme, $env_proxy); + } + + $ua; +} + + +############################################################################### +# +# Send files by e-mail +# +############################################################################### +sub __send_results_by_mail +{ + my ($mail_to, @files) = @_; + + foreach my $mail_file (@files) + { + system("echo report is attached | /usr/bin/mutt -s 'breport' -a $mail_file $mail_to"); + } +} + + +############################################################################### +# +# CtrlC Interrupt Handler +# +############################################################################### +sub __abort +{ + system('stty','echo'); + print "\nDo you want to break? Press \'c\' to continue, \'e\' to exit: "; + while (1) + { + my $input = lc(getc()); + chomp ($input); + exit(TE_ERR_BREAK) if ($input eq 'e'); + } +} diff --git a/src/core/dev/rfs_rule.cpp b/src/core/dev/rfs_rule.cpp index 947506217..aed933c8b 100644 --- a/src/core/dev/rfs_rule.cpp +++ b/src/core/dev/rfs_rule.cpp @@ -112,7 +112,7 @@ bool rfs_rule::create(doca_flow_match &match_value, doca_flow_match &match_mask, doca_flow_actions *actions = nullptr; doca_flow_actions *actions_mask = nullptr; if (flow_tag) { - rfs_logerr("RFS flow tag %u Priority %hu", flow_tag, priority); + rfs_loginfo("RFS flow tag %u Priority %hu", flow_tag, priority); memset(&actions_flowtag, 0U, sizeof(actions_flowtag)); memset(&actions_mask_flowtag, 0U, sizeof(actions_mask_flowtag)); actions_flowtag.meta.mark = htonl(flow_tag);