-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue: 4202062 sockperf tests for DOCA
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
Showing
22 changed files
with
8,391 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.