From 798cf86811dd5eb2b8023f024f2360f14d1230db Mon Sep 17 00:00:00 2001 From: Tomer Cabouly Date: Mon, 9 Dec 2024 14:25:48 +0200 Subject: [PATCH] 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 --- contrib/jenkins_tests/test.sh | 4 +- contrib/jenkins_tests/verifier_in_debug.sh | 2 + contrib/jenkins_tests/vg.sh | 2 +- contrib/jenkins_tests/vutil.sh | 10 +- contrib/verifier/README | 40 + contrib/verifier/doc/Test Matrix.xls | Bin 0 -> 78336 bytes contrib/verifier/lib/TE/Common.pm | 114 ++ contrib/verifier/lib/TE/Funclet.pm | 413 ++++++++ contrib/verifier/lib/TE/Progress.pm | 99 ++ contrib/verifier/lib/TE/Utility.pm | 586 ++++++++++ contrib/verifier/lib/TE/VERSION.pm | 1 + contrib/verifier/lib/TPB.pm | 48 + contrib/verifier/lib/TPP.pm | 976 +++++++++++++++++ contrib/verifier/lib/TTP.pm | 827 +++++++++++++++ contrib/verifier/lib/TUL.pm | 1093 +++++++++++++++++++ contrib/verifier/lib/UDS.pm | 321 ++++++ contrib/verifier/lib/UPB.pm | 48 + contrib/verifier/lib/UPP.pm | 1019 ++++++++++++++++++ contrib/verifier/lib/UTP.pm | 974 +++++++++++++++++ contrib/verifier/lib/UUL.pm | 1116 ++++++++++++++++++++ contrib/verifier/verifier.pl | 705 +++++++++++++ src/core/dev/rfs_rule.cpp | 2 +- 22 files changed, 8391 insertions(+), 9 deletions(-) create mode 100644 contrib/jenkins_tests/verifier_in_debug.sh create mode 100644 contrib/verifier/README create mode 100644 contrib/verifier/doc/Test Matrix.xls create mode 100644 contrib/verifier/lib/TE/Common.pm create mode 100644 contrib/verifier/lib/TE/Funclet.pm create mode 100644 contrib/verifier/lib/TE/Progress.pm create mode 100644 contrib/verifier/lib/TE/Utility.pm create mode 100644 contrib/verifier/lib/TE/VERSION.pm create mode 100644 contrib/verifier/lib/TPB.pm create mode 100644 contrib/verifier/lib/TPP.pm create mode 100644 contrib/verifier/lib/TTP.pm create mode 100644 contrib/verifier/lib/TUL.pm create mode 100644 contrib/verifier/lib/UDS.pm create mode 100644 contrib/verifier/lib/UPB.pm create mode 100644 contrib/verifier/lib/UPP.pm create mode 100644 contrib/verifier/lib/UTP.pm create mode 100644 contrib/verifier/lib/UUL.pm create mode 100755 contrib/verifier/verifier.pl 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 0000000000000000000000000000000000000000..3ec8c6c0846a393ccbe7200d77f54c166c4215c9 GIT binary patch literal 78336 zcmeI532+_9dFST=AP9&cAHZAS^+q#NQ$D4=pd~lwpP|k5C}-LKmZ0o z9kwMyR~$QbB42Xo*l}zti5(}lWIJ{oI}+_Zl3g>2BCoxU_p-NkQ;qP@)0zWgHwK#5d2#XMS%oigxAT%Oeg0KXk z31KP1GK4$=szB6&upD6p!b*fy2&)m+Ago2W6rmMi9m0Bq4G0?%HX#%cHY037XhUd6 z*ov?XVLL(x!VZL;2)htE5xNk%5q2XK5lRR>2)zh>2zwCrBJ4xhk8l9tGK4oET#j%B z!Y?5lL^ya)q_UN2^oex@`Fzi&%mrn2ICxBMF$a2D4uioUV*JWqLb z?*BNdiJq(b7CxiszaqQ^H4WE>BmKhzg}M5>QZe-B$Z$n&IqowxxFgk}w$)PU>K z$6;B9>kCsXSD!1?=NDC;Z>rBj%JP2od4;-8A@QN8uwPy0a?$lQThzK`_{>FLQ+a-< zEG1mE{t}6&-}Q73Up42WMY+Q`J5J(^9mZ8htc_mVwNvVMzsVg-{oUlX-7a(O`6!<| zg0uUK;vU3j0oSfUTpJ3w-rbIKe`8%!^enIS*Brg+=*@?3_>sDXKO6nu=>mQ{{ySHo zoyDN+|7Uh~;wPm~vvaFS>3?zU&!S8V+&%Lbm-8-N4y*?1FShSUv3I7}cc$1I6YUXd zf-3*7n4hhCe!ZvciLF@IhQ5>1RaI-~at|G|dI`L7!MzurNux`IyA_ zBqLZjckUd%CZn@wr=zpIL%5TkkIp0g5dNoOkA@IG&kX{W|6EktQ(I8mP(O$?%y%C7 zr>Dj_7vZc5 zu=OG@40q$on2Vmm_4c|B5a1Y}IWg8XHb%?ybcu}R%rGs(bV!V4LZ#XF5o;N{hiQKP z8Eu&uh`00Se_<_pJ3suN)}ps_WErnQ^^wYj?KDM?uBW9gnixDa_C9VwQ4)lad)<=V9$+k|EMw9KV0ux7c|eAk(8`oa3QBHVYhKg>8Q9lzsk^hQgjmLvWm z)-*(qdL(#^c;ND7)xdFf00FSug|G{bgX;dhD=8`D-v0iuERmTg*ue<4* zuH(mUx(2`cKzFfwA1EFub@%YAr@If<@zVaid%-c@vyY#>YPqijkGic?=qikz9J#k^ zY;@$_!h^d<3;pBwo;fu*GI1J7Ck9H`3ac&7$hIDlc64mwPT*NK4x8LYJjn-xdBzg*>{WS^j}G$;Cgj;0_%ep764)BMc=olRt zESw%4xPNe>Fg7?|m{4nV_3hcGHkV#S6!z>lw_j~8z4E9%n*HVuT#cRWO|Mq|&f@Is zn0RnBZEt&vYJ2H5&fnXawpUWyORtXp?#{Hm9^BU2deiG_xWCw8++g}}7V9HyE=#?= zYD?)=INZ~;E%m7_rC025AJew92X0(judME;&J0hS9OyqiQHU?=I48SK4Rj5Uj*i{a zKX8B7;7I>H!-MK1>)qSOEy&8BxP_$4Ztp&oTh{gD++*Rzw0FPCEvt5N?u1Km?*TNM zwe`uGoSYjsjNnq)S5(<$#ZAr*^e}r#Wta6dIXl?H>^++ZpIj~Bqn^IP+==^oH#1>! ztuqPD?YOV6jY*TMRXJ&#c+VY7ENjl0k)Yo2!aTvd&?z_&I3>Eq_mr^HUHXcruZQpl zU^&r0(cg7)WMc5%@skq|tIE~47cGZveY2}vui|I+!Cj?GdK=mUx^6gj_$uX>z!N$% za$;~C^}hdv^f6gbJao?b_*`-PN;*nBLJ6thQqm{mVM$(FBmxgb%4+3>vGfzx!+GRS zv)Gc>_Nui!=MvV!W#ljOoJv|tZ;>?*SIy)E%28AvI?s%RO~9{HrJGWGbPkmxno@Ae zE!<9ml(Lf!p>mv3ic$MBuKTD`rxdDoWrEZxg{-|8H+3hOQwrUXxM#Uao^linil1Eh zdI=?NSlr~wnMyf88m8<`6^bfx%Hh%|e&Up4r$L;=%0o>(j=oc;Qdc;ZW5P94sVf{y z>B!M(P##=L`Qa)iE?KEAoZ3)@!>k}@<87%8Rj2^|JwBD_8tj_#*JinE=?;0Yu_Mz8WE{~$nv zj9y(!&geN>1)`=@E#nTcc}e+J&fb(A0qunqi|tI5QZ*d63ayXYpQ^AeT!qF5$A%y7 z8hl`I{9*WbMU^Y%CRE;dkZqavcW%A*=3}>AbM5ilZjButxMibf?!9jekN2WcEp~XE z_2vDv4Qa8%laR`Bc#_wa9iEicWrrtWz2opCt+ftM!dl1SNm?r$o}>iQ;Ymp0Iy}j% zt;3VNzNfG3@FXNiad;9_`fXojhbJYqJm*zv*0q$>@=Px~JSnNYhpMu}laky!tC?Im zJSoY&bGhvBq$F3jiMU;>?C_){b{q}k9q}rWlGyPx3Pt6V@J^GG*ug+6mP*YFM@njk zBTmh`M@ni31gXmoPfBVI+(y~qaX1oh&6OOU znewJNJTvCQ6(`BznK7Td43-_98S{A;#InOPV@7}`Iy^IG^e&Rho9Ruiq-9^CNxKfm zZ#aDWm4}a9&s#pdva#X*huJnL-3GL)+O-r}O~-CJ%3bps9lP{nr&HoMRnSJ> ze`>JMf8xaWWn-h`6FXE!-hpi2pUNl>Rcc0FrM!&dSS4lLM^yT`UPgJa(sFvOi!rNn zv{G}bLM``js+{t0CFN9&g1pRF+OnIb-BHyV$YY$EqF7YTfV@jpNK-7{fs*kW3tz+b zKT~tcEpqBOc+W<&t1~L6=OM=j!k*trrKxgy&qncqsGL)^s(VjIG3^WopIQ9}q!@QL zS-nT3n0JP(>RHEoNb+h<`RY*N`9weKq&!NOFCpfs#eXEaJo*IWou+r*JUj(YF8YDT zs|X&cYEG8VNqFGlg~&eeaBtKl$hk-co58hCUB1kp#7{r>lb3J2=lH?9lzmc3DzE|kZKW(H%H8YHU0-)i-4*yeP`3qn zO3(^#gXVV?^t;<$?S_uyXYR$%7qF@0(G!aEN%gr6`vlnx{{G?Mc4xT*%TILu;PI{> zOdZ_eEPo0+(}+t=BC^j5Sop8W3aM)UigySSw!u zcMX2?QuDu5t>^Y}c9_()U};s-F6OO8`gQo$TdGCejn!c|gI%{s#Og(Cv4}N@Sfh!N zt`^%{Z~iqM_cyPGUXZ6w(XsaHm`hhD=<1Nx(or<+##}lI=G=8IT^&k7uOnSuK*ti# zs{tY8S)}NA&gqy-w@A<}5_F3M9p&AYXOW;=gyZC{bLkcZbgTh+{A-?iMaMIpbgYB+ zSk?==dO=q&=;{R>h3J;2UeMKxva1j1SR?al@C`0Zbj+n&Ea(<1I$m{jN*-Ao zbIXoGNOzrEc8dkw;((6lLmpCI{VNTMj#n`LW`iiZ20_;#%C13_U4tmQ22pmDPTG>B zxL?Ou?-~L+-aGPYkP&$r6&^3;ZFvxDo+d@dI}_>XOWM+E5_C<1u1U}} z3A!dh*Cgng1YJ`=M;{}v2CtC^_cD|t?}s|((k&HqO9kChLAO-UEfsW21>I6Xw=|&R zl{X(13=e(6R`|-Aj(0v=cD&QLF}L0=6LiZ2-7-PPGt<_)WrA*5K*#HF9$v2I$tyZM zTdT6;^MU2b3%a~0yS$*w3%b0Z<2~Kdi{|l+p-Zbp(QPls+_GyCbS;9eMbNbfx)wp#BIsHK zT}wd6yH;Ke)nsXLpjN9Iw5ek*-Eu*N~-3mdsLeQ-cbSnhi3PHC*(5(pQc!$m7K~?i`h*hf^;7Zn&f^Mat zTPf%`6vx&k4#06^?!98Apj#>ERt9vubU1RY1q5r@R^hOuE&Iu4L#|3%b>Ujw5$09fz;FF}Lhi3%b>UZndCW9njGq z$*Y0Mq+6rtdJWwgLAOTGtr2u<1l<}@c54LP8bP;4(5(sR_(Yjk!=*{LR?$Jlpw5c5 zf^My#TPx_+3c9s|Zmpn0TZ2=|YX#lffR5f$UJc?V9iIJf86LK?w5rJq$huL`Z4`7H1>HtLw^7h- z6m%N}-9|yTF`%O#oL3VmkY|&kJ7QQj3A#;!Zj+$fBUOhuyrTc zc!&4%787i|*ShI=+zYVf)ifG9#yWZwHXY-YJ3fO7q81cHEhvauP!P4CAZkHD)PjPj z1qD$HNWdeWSCf0_80oGtbelyT-7M%f3%bpMZnL1#bXx@77D2Z~(6Rr)-dDB+bUX|4Y9bWUwJEym4PBd{YZG*B zg04-_wF$a5LDwee+5}x&K*#ejucl`qUAv;Y(a^OEx^_X=F6i0?UAv%b7j*4{u3gZz z2XwqLJT*w_VV&x6aaS7j)YLI$pQ)YT6$j*$zc_o1yCvN47)IbqKl+LDwPZIs_g24=r7X zpz8?ecn8U=$%sg|L(#p-(CrX(I|SVhLAOKD?GSW31RZ-cE!_@5w-t820I|bcNLAO)T?G$u71>H_Tw=6B z3A$Z^ZkM3jCFphux?O^9S3t-6dtOZ^MY>K!cc-E26m*?}u2ax;3c5}~*D2^a1zo40 z>kR1VY2?);SETDwbaxrLE=3pjn{^4gEEW6!`Zots(7G<|v(CrpNp|j(%WXO;bj?qM{o#bVWf|6m&&FR}^$bL01%XML|~-bj5&<9%)`p zo<_QoqPy47mBd+5QgpE|S`u_6MQ7K!?FJ=9XVEFX+s%r%4UoU(r# z_UY&)B^-HKeSTMcem}>pO+!h779=i42W!|%{$efr*|BeGViYbn=enYo(7)7MQ;I%= zH7!$2eJ4DPRcJBR3IJN%zgKYVF?otg`Bh8+#&%}?*RCcW zq4BvKTNiWKPu3~+0>w+uV=rse1c%ep`wPfj_w}`xq6F78L`RO@bnDTZZoTEo+#}JN zIyD{3;WJT~;qpbv88|}LP6C$H2 zW1pzo3c%JD_C)%&e1eVFH9uWTf{kaspN`jA-}X;acXc01;`OS#Itg~(t3%zDeU9KA z#f`ab{I$Z9s1=?>t?(pjg(p!fJc%^j)msf+sJpT})LpqTm#(_HtNRUIsJpT})LpqT zm#(_Ht6@VI>aHvgbysf8rK_&)>Xe}ibyt>$x+^#4(k&MCZn3C$T6e`eHETAfDs{Kw zwz8$^u0~AWPqsJpT}yxzDmm#(_H ztG5}tP#$3AU>aNZhx=?pzd8oT`V=i5Fbyp7%Lfw_+ zq3+6!xn);f-PJ>eF4SFF9_p^#m`hh(-POZ}F4SFF9_p^#m`hh(-PPL-U8uXVJk(ve zF_*5ox~q2>x=?pzd8oT`V=i5Fbyx2+bfNCb@=$l>#$3AU>aHF!bfNCb@=$l>#$3AU z>aHF&bfNCb@=$l>#$3AU>aN~p=tA9<<)QA%jk$Ey)m=>*x=?pzd8oT`V=i5FbytrW zx=?pzd8oT`V=i5FbytrYx=?pzd8oT`V=i5FbyrUqx=?pzy#VU2EZtn{uAVe>q3+7k zQFmqO=2Ca{l%WfCSC)>tD@(VayJAZvdszHdME08dww(#K?CGw4)zpFl+Nq`P%GLtv zu52xsOWoDG4c%r%cTG7~1D?1?jk+sKHxM4WU0FKnt}NYL>aN~r=tA9<<)QA%jk)*a>gulE zZ|FkZl`T8!t}NYL>aKpn(1p4yOGn+6rJGCL)o&WQPEx=?pzd8oT`V=i5Fbyv?Ax=?pzd8oT`V=i5F zbypuXbfNCb@=$kW&k?P=imww|cNO=Wl|-MK)?L|kZl9XgU2)yax~t=m^VCdTi?kRy zp!8Ep%+R29S4G%ot-C@V>aMhGs1{3y5aK^28=~}(LX$51Uvh~n8{!lKS~kR`PzCf_ z%Z8rIae$B&D)CK<6fdz8kwUelbHKo|SdcEwsdQ;Us+N*_0L*_0}M!q8+N*vDeI`kjV!HX0D*cI}OOh(ZbPH0YP=eHf za`RS%%4>0YlbdK zsua`BpH%5j4PBB{DW;o0snXXCU6NEOrqfcTxZ`gwrAmKh=#r#LG2Q%0mA+x*PDOLJ&Lzg5~ipy^Pq)IOsx+JMmOgDd0r56odl2j?Cn?I@2IYXBuRf_3m zmMX^fIiFuN(DzGdi=q)IW}{7IF*ZRnDuN-^F1NtOPEq05p~=>>Qw-SAsl zAyi5JUy44=f|;5rImLRk{4$Le>Qqjnx{tGv9EIEiGZuOLHM%*(M|`B+?R=ZhVtwLCW%ad)pan)+}e?sj8GkKBRD52s^6X z2N&AdJ?z`qDeK$V73$k~uJ|@~`}sC@w)r-8arriOEcrIX0~utWyCN&6(H(-7)97xw%4u}xSmiXji>h)O-BDCIjqa|goJMz=R8FJ2E-I(d z9SD`v=w|%NX>? zZEQ;MZEV2sZEQC1ZG2ewZG1%bZG15GZG0T`ZF~sxZG80cZQTjBi*0h{HB&dTrXLHY z(M_F|)941r%4u}7U*$Bq@vU+i-2_%Sjc$mloJKbXRZgQDWh$rPai8gtko91uG`g9f z@^9&f^~!1VBXi|6tVc8PuwKoSrn--@hup{5=8JfYMIQSY3)dzbiNP0{@?nFoMRgxz z`FP74xO%+B(tJL~)-627zD{4-ot4Mfuz!%Jh2LjbpJ3z6$bLGEZwhQYi~MwKMf7b; z5^QK}3eqi19@~tIZ&)tt5^Q{RmS4^r5^Q`;l%H;sXS0v7{~BvvpO3MXUfR7e`U~tA z_mWq3H|7q9tnTEoJO@aiA8J|qb*#qW;pDNFE*mfHwmh6X){VJkSKY~DIaxGIOFzit z{%&G!*>Un%OP7t8c3U1!9_z+fc5#DAbtjMIB-kuF-FUI89COQ#<3252HeT9odDxWi z#@u>W-N|G5T1=LmZm_wu9COQ#*Az>~^V<$@uI}Wqyi<@)Hx=<7p<^x`Cy%vs*?4KU z<>BP9ZpP{ZZyCO?VH;?gtsAF!~aq?J8myMTpTOLjx>&D!&tM25nTTE%`Cc(CH z%q=@k9&72c@zQR~!x0&7%q_e5dTF=i;pDMy%%!XDT{t4c@^JE4H|Ek+ck&9HV>P{ZpW9Y&W8J35W$GS0>uDX-Q_8GcxM26+z8d+<>@OL*a72dX;fM@3=F-jAOS>%(M`XA$mu|jZ+HH9_BEyZjbPF%- zM&&cF!bE2e2&PlwO}qMkGt8m5gBgGt)uhx(r(Mc5gBgGrJJvpc3Yk{L8nJ##O+n{_0n!j#}OHB%q_e5dTF=i z;fM@3M!LA{s{7LJzcgos?g)QlIp&_ToIKXj&E-qG|Bd0%UGTS*V=f&>WLUbnoILj5 z8Xn#Ge_J``(s4wFrJKviW4~i~wCvzb<(Nyy5gC?FPaYfBJN?pb8>2+e#uhtmmindL zcAfizvb2|WpEo>O@Nj!M=F)LQhNaV!$Hu>+U)pVBF5RntY4=|l9xb)Fqa1VTI3mN+ z>B(bb9{tj88*}Mi{Y$(5+VE(R$DQSvOUDrzmToR5kNq3Nqva)cm18a)Cy%vsbNSNl zmkf^#8DoIKXj>6doLHErg}V{J-zoKmHic2n9_ zUHQ&&SH6SJC$t1lv3+OO6R9GPmG4k>a0ns(QxmE3GDMNZ4*a_lsdC4)d`B12bo9DfF$zwX zNFzq(+H-dPvep4Llb^89@DT?5l|wWk4_t&Y|3{g3?2MDoE4kPG54&PKl#oX!;?+< z&I5){k0sn%j=5zwfAXCN4UZnhxV;>6>E=(q^N``mrhMmNLzhkY&f5)LHsw3-Fm&0J z@4VB{WmCTMh@s1-eCJU^mreQ3y9`}66sO-FUQCvQhDXooaAP^<(#@ZI z=hqF7o=xIdIp)$O$#>$mzUs<%zH4~0Dc|{bhAx}(o$ndCY|3}OZ|LSqz7yBi9pao# zlkfa{L-$(BcVdE9FW>orp?fXmJ2Bm>m+$M^pT4#Z zx`>*obI?fKZG=NqL)4(Vox-8d!ai%^5b{tV!Sr9j_otgK(bM6=j$(^?b4#Y!t1*cX zMNgq8BZ}S)+9-MvJrE7io4FWGs?W!A)6?goC$M}ldNJ1=HAf_jqHn`K9lfO9bnvqJ z{I2@^evVt4hMoiMI9!Yl*08Vo#o8MFbksb>enl=f=XOOeVaRrGO`jrYnPTcYQD&>4 zZD2b~`1cCvqG+i~`PJNVrGe0?ZUGtpE{|@FqSK=T_m2&Z4_#I`GJJAyWTJauZ0xeW z-oDF@-hA`1n_=xAxqG58Fgh|aI51IQ>cNRZ$Kd$*$mkWNQmJr6uQ@q7QWzf`I&*sP z#E#3=_7|()xJ7+N(JRqcf->gu%2FA3nlj#l0p3yMm$5oPW^dxJY?bkP^n6jnMwJ`? z7%!^0W>;?+uTK=m#o2aq1C91A=Z2o1F4E-F+J` z^1iJl!N!}6pN=DGu!0ojLSLI8~|61fg7bqW{#b;yz{QvMGrBw4u9D zL0tThU)}kvK4a*zDTsU4&}CB)_j`sen}WFCH*|9)i2E5@I3CAuK7qiFZgwZLGm%|( z>=_apoU!fzrxjqm}44KS^lW`hH2q1!zB=3ubSbPS|M&T zT6d%nm(L&h=nwEoA2pkT$j=(OYziVjXXvsii2OrCmrX(B=M7yp1(APb=&~t@{9{9x zO+n-r3|%$_kzX`)*%U-RXXvsih~5nMkWE44pBTCY zK_uqL$8hs)C=b6yn4+F|Sb98n8KpG7jRF?mM%jpOqgcbYQ6k~nC`|Be-3c~!!u#pi z_3hiz1(9DhwIG{<$gdf?YziX()X-&95czdOccFsF_(`X_^O^mbq06Qq@*9ROn}W#y zV(79Yh@{9xOCaOtVgFmd>sbpC{dI9%r_pl2*yexhG+LDBuZ!b4jh4p6Hve0v(E>Gp zT^!eGv`j3v`QJJXug;YOJ}e(Cney|;alIWaT#9Y}w@!1RVj}x4>@jy1qV;U4xWHM6 zkcVO-CA7eI6dh8Z`a{h^)Q$!c>NDE$?+Pup!LEfCdTBm|7TXtu77IcPbUF^v8ZR|euZS1u3Z9G?e8#}0c8@q*k8#`ls8@oV!8{&bD&Ha8lHnRIRHf{Pg zHYoZwHskp=HlF!5Hd*;LHWc|bHqZDrHj4N*HbwY0HURiGK6d*yKJ5B7K4SW|3wsy# zk8oYgme7I^r&?%1EhA@^pcXThU0BgYrFUW5u|G+(5XHJ${Sq-7bLYKSco(*No7cB^ z-4*TH-DRCdcL=+7cUh;=-LkITUDj!I=csFUmvtJ{{2ARF-BIY~b(i&aba$O=cb9b< z-D%?5-DRCdcU`!4cUh;=9SE-7UDj!IGrntgmvtK5nC{x$Wt~PhX}flJS*Otr%dXvB z)@gL}u4{LfbsF8s>e}69okllxx^{P2r_l|LuH9YMX>_xnYj>A*8r}Hj+TCTHX5n4f zN)QjnST{Chxp9b(D!MtyJ&x|OKBf!r!gkBVUDoBZ@EGfsiMy=J=i(n@C*8-`!bLpB zBF_wuv1#wZF2P0O4YL-HkX)+%V=UX_8XKT>u5XUMvGlweby5!-CmlP1CwNYs+Ja9E zr@?@jpMLHqFW-32@q>3MI|>SR{kOHI4hy;5V_5U8x}7S=F7^4iO1m;T8sU`Q79BxT z_!f+uIT@Xb1~I2tA-W0Q590ggXcV@8Vvmk-`RVUhBHNnsv|A0^FQOVE&kWU2|7gxI zuqrJ4%}WXJ5X9Ooo<}@xJPT>#ImYjWzhB%E$l(ar;{4+tHaGBU8%5{TXLR*CeBXF- zV0`rS=+H#r=tBd8!-WI;x^C^iXK;9UP*syFPYw<3*U2yL6ZKF3=*49RJsV}iO|V}7 z=&4WsuYWvtU-Rcb&=Bp~{^h?b!p6R9)@!c67J+sCI09`a5ZK835CShrPa-Tqcp9Mz zfjWK;F#Ie6fAJrF7NHMZue z(VYAd2HcO!`<7-$l7+utkP@KlGa5}q1$ap#_#TfQzMwthyEx;kqpCmNH6&?cABOP| zD=7ZngkK+z?vL(K9QSME1$-_?ZRMtT9+P7>S(*Ml8%fJLe+0jLDjJK9f#I#nb|D}9 zeV*5G8O%2CbtYjBzdH;!^kV8>sh3x-I^Mi|`TcR`Af4aXs_Sc~n45?#6%LJU| zQCQOdI?V6WZb3aY KcpI 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);