test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ke Xu <ke1.xu@intel.com>
To: dts@dpdk.org
Cc: ke1.xu@intel.com, yux.jiang@intel.com, lijuan.tu@intel.com,
	qi.fu@intel.com
Subject: [DTS][PATCH V1 4/5] tests/vf_offload: fix error when no packet captured.
Date: Tue,  7 Feb 2023 11:23:12 +0800	[thread overview]
Message-ID: <20230207032313.404935-5-ke1.xu@intel.com> (raw)
In-Reply-To: <20230207032313.404935-1-ke1.xu@intel.com>

Signed-off-by: Ke Xu <ke1.xu@intel.com>
---
 tests/TestSuite_vf_offload.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index 93b28afd..e9f70562 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -266,7 +266,7 @@ class TestVfOffload(TestCase):
     def filter_packets(self, packets):
         return [
             p
-            for p in packets
+            for p in (packets if packets else [])
             if len(p.layers()) >= 3
             and p.layers()[1] in {IP, IPv6, Dot1Q}
             and p.layers()[2] in {IP, IPv6, Dot1Q, UDP, TCP, SCTP, GRE, MPLS}
-- 
2.25.1


  parent reply	other threads:[~2023-02-07  3:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  3:23 [DTS][PATCH V1 0/5] Update vf_offload cases for DPDK-v23.03 validation Ke Xu
2023-02-07  3:23 ` [DTS][PATCH V1 1/5] tests/vf_offload: add VLAN packets to test scope Ke Xu
2023-02-07  3:23 ` [DTS][PATCH V1 2/5] tests/vf_offload: improve TSO validating Ke Xu
2023-02-07  3:23 ` [DTS][PATCH V1 3/5] tests/vf_offload: improve vector path validating Ke Xu
2023-02-07  3:23 ` Ke Xu [this message]
2023-02-07  3:23 ` [DTS][PATCH V1 5/5] test_plans/vf_offload: add VLAN packets to test scope and " Ke Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230207032313.404935-5-ke1.xu@intel.com \
    --to=ke1.xu@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=qi.fu@intel.com \
    --cc=yux.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).