On 14 Jul 2021, at 13:02, Amber, Kumar wrote:
> Hi Eelco, > >> -----Original Message----- >> From: Eelco Chaudron <[email protected]> >> Sent: Wednesday, July 14, 2021 4:08 PM >> To: Amber, Kumar <[email protected]> >> Cc: [email protected]; [email protected]; [email protected]; Van >> Haaren, Harry <[email protected]>; Ferriter, Cian >> <[email protected]>; Stokes, Ian <[email protected]> >> Subject: Re: [v11 07/11] test/sytem-dpdk: Add unit test for mfex >> autovalidator >> >> >> >> On 14 Jul 2021, at 12:27, Amber, Kumar wrote: >> >>> Hi Eelco, >>> >>> >>>>> + >>>>> +AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d >>>>> +| grep -v "not available"], [], [dnl >>>>> +]) >>>> >>>> Please, if you make changes, test them, as this has never worked, as >>>> you changed this to True/False. >>>> Here is a working example: >>>> >>>> AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | >>>> grep "True"], [], [dnl >>>> ]) >>>> >>>> Also, make sure you test it with this patch only, and the full patch series >> applied. >>>> >>> >>> I tested the patch with just patch 7 that should skip it and it does : >>> >>> 6: OVS-DPDK - MFEX Autovalidator skipped >>> (system-dpdk.at:248) >>> 7: OVS-DPDK - MFEX Autovalidator Fuzzy skipped >>> (system-dpdk.at:275) >> >> Yes, but it was executing the test fine with all patches when no AVX was >> supported. It should have skipped the tests also in that case. >> >>> But checking true is more logical so will take in v12. >>> >>>>> +AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set >>>>> +autovalidator], [0], [dnl Miniflow Extract implementation set to >> autovalidator. >>>>> +]) >>>>> + >>>>> +OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep >>>>> +-oP 'rx_packets=\s*\K\d+'` -ge 1000]) >>>>> + >>>>> +dnl Clean up >>>>> +AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr]) >>>>> +AT_CLEANUP dnl >>>>> +------------------------------------------------------------------- >>>>> +-- >>>>> +----- >>>>> + >>>>> +dnl >>>>> +------------------------------------------------------------------- >>>>> +-- >>>>> +----- >>>>> +dnl Add standard DPDK PHY port >>>>> +AT_SETUP([OVS-DPDK - MFEX Autovalidator Fuzzy]) >>>>> +AT_KEYWORDS([dpdk]) >>>>> +AT_SKIP_IF([! pip3 list | grep scapy], [], []) >>>>> +AT_CHECK([$PYTHON3 $srcdir/mfex_fuzzy.py $srcdir], [], [stdout]) >>>>> +OVS_DPDK_START() >>>>> + >>>>> +dnl Add userspace bridge and attach it to OVS AT_CHECK([ovs-vsctl >>>>> +add-br br0 -- set bridge br0 datapath_type=netdev]) >>>>> +AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dpdk >>>>> +options:dpdk-devargs=net_pcap1,rx_pcap=$srcdir/pcap/fuzzy.pcap,infi >>>>> +ni te_rx=1], [], [stdout], [stderr]) AT_CHECK([ovs-vsctl show], [], >>>>> +[stdout]) >>>>> + >>>>> +AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d >>>>> +| grep -v "not available"], [], [dnl >>>>> +]) >>>> >>>> This does not work, see above, but also move it up right after >>>> AT_SKIP_IF([! pip3 list | grep scapy], [], []) to speed up the process if >>>> it’s >> skipped. >>>> >>> >>> Cannot move there as for the command to work we need the OVS to start first >> to accept the get command . >> >> You are right, forgot about that. I was suggesting this to avoid taking a >> long >> time delay to create the fuzzy.pcap when the test does not need to run. So >> maybe we can move the creation of this pcap below the check. >> > > I did try that but once we have a Ovs start we cannot make the test-case wait > to run a pyhton script it will continue and hence kept it like it > I know it does waste 5sec but I will looks to improve it but otherwise this > is the order we would have to keep. Don’t understand why it can’t wait, but as this is more of a nit, ACK as is. >>>>> + >>>>> +AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set >>>>> +autovalidator], [0], [dnl Miniflow Extract implementation set to >> autovalidator. >>>>> +]) >>>>> + >>>>> +OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep >>>>> +-oP 'rx_packets=\s*\K\d+'` -ge 100000]) >>>>> + >>>>> +dnl Clean up >>>>> +AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr]) >>>>> +AT_CLEANUP dnl >>>>> +------------------------------------------------------------------- >>>>> +-- >>>>> +----- >>>>> -- >>>>> 2.25.1 >>> >>> BR >>> Amber _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
