[ovs-dev] tests: reset pcap before comparing with expected RA
diff mbox series

Message ID 20200213211325.2679526-1-ihrachys@redhat.com
State New
Headers show
Series
  • [ovs-dev] tests: reset pcap before comparing with expected RA
Related show

Commit Message

Ihar Hrachyshka Feb. 13, 2020, 9:13 p.m. UTC
Unless we reset the pcap before extracting the received RA frame from
it, there is a chance that a previous test left a frame already
captured in the file, in which case we'll compare the expected frame
with a frame that does not belong to the current test check.
Alternatively, an old frame will be left in the pcap file AND the new
frame will be appended to it, resulting in two frames captured instead
of one.

Both scenarios result in spurious failure of the RA tests.

The fix is to reset the captured traffic file at the start of each
check for each hypervisor.

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
---
 tests/ovn.at | 2 ++
 1 file changed, 2 insertions(+)

Comments

0-day Robot Feb. 13, 2020, 9:56 p.m. UTC | #1
Bleep bloop.  Greetings Ihar Hrachyshka, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
fatal: sha1 information is lacking or useless (tests/ovn.at).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 tests: reset pcap before comparing with expected RA
The copy of the patch that failed is found in:
   /var/lib/jenkins/jobs/upstream_build_from_pw/workspace/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Ben Pfaff Feb. 13, 2020, 11:45 p.m. UTC | #2
On Thu, Feb 13, 2020 at 04:13:25PM -0500, Ihar Hrachyshka wrote:
> Unless we reset the pcap before extracting the received RA frame from
> it, there is a chance that a previous test left a frame already
> captured in the file, in which case we'll compare the expected frame
> with a frame that does not belong to the current test check.
> Alternatively, an old frame will be left in the pcap file AND the new
> frame will be appended to it, resulting in two frames captured instead
> of one.
> 
> Both scenarios result in spurious failure of the RA tests.
> 
> The fix is to reset the captured traffic file at the start of each
> check for each hypervisor.
> 
> Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>

Thanks, applied to master and branch-20.03.

Patch
diff mbox series

diff --git a/tests/ovn.at b/tests/ovn.at
index 8e18b24ec..ff9a732fd 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -11548,6 +11548,8 @@  ra_test() {
     construct_expected_ra $@
 
     for i in hv1 hv2 ; do
+        as $i reset_pcap_file $i-vif1 $i/vif1
+
         OVS_WAIT_WHILE([test 24 = $(wc -c $i/vif1-tx.pcap | cut -d " " -f1)])
 
         $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $i/vif1-tx.pcap > packets