Skip to content

Commit

Permalink
issue: 4202062 sockperf tests for DOCA
Browse files Browse the repository at this point in the history
as part of the preparations for DOCA TCP/IP -
adjusting sockperf tests to use doca.

Signed-off-by: Tomer Cabouly <[email protected]>
  • Loading branch information
tomerdbz committed Dec 23, 2024
1 parent c61be40 commit 798cf86
Show file tree
Hide file tree
Showing 22 changed files with 8,391 additions and 9 deletions.
4 changes: 2 additions & 2 deletions contrib/jenkins_tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions contrib/jenkins_tests/verifier_in_debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
PERLDB_OPTS="NonStop AutoTrace" perl -d contrib/verifier/verifier.pl $*
2 changes: 1 addition & 1 deletion contrib/jenkins_tests/vg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions contrib/jenkins_tests/vutil.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
40 changes: 40 additions & 0 deletions contrib/verifier/README
Original file line number Diff line number Diff line change
@@ -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.


Binary file added contrib/verifier/doc/Test Matrix.xls
Binary file not shown.
114 changes: 114 additions & 0 deletions contrib/verifier/lib/TE/Common.pm
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit 798cf86

Please sign in to comment.