[DTS][PATCH V3 4/5] tests/vf_offload: fix error when no packet captured.
Ke Xu
ke1.xu at intel.com
Mon Feb 13 09:39:51 CET 2023
Signed-off-by: Ke Xu <ke1.xu at 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 381f110c..80cb0af3 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -262,7 +262,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
More information about the dts
mailing list