test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lingli Chen <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: Lingli Chen <linglix.chen@intel.com>
Subject: [dts][PATCH V1] tests/kni:test ping add ip6 addr
Date: Wed, 24 Nov 2021 15:43:38 +0000	[thread overview]
Message-ID: <20211124154338.132083-1-linglix.chen@intel.com> (raw)

When the test environment has no IPv6 address, add it manually.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 tests/TestSuite_kni.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 85289d37..c2b05bad 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -611,6 +611,17 @@ class TestKni(TestCase):
             expected_str = "0 received, 100% packet loss"
             self.verify(all([expected_str in out, expected_str in out1]),
                         "ping not supported")
+            out = self.dut.send_expect(
+                "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'| cut -d'/' -f1" % virtual_interface,
+                "# ", 10)
+            out1 = self.tester.send_expect(
+                "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'| cut -d'/' -f1" % tx_interface,
+                "# ", 10)
+            if out.strip()=='':
+                self.dut.send_expect("ip -6 addr add fe80::742e:c5ef:bb9:b4c8/64 dev %s" % virtual_interface, "# ", 3)
+            if out1.strip()=='':
+                self.tester.send_expect("ip -6 addr add fe80::742e:c5ef:bb9:b4c9/64 dev %s" % tx_interface, "# ", 3)
+            time.sleep(3)
             out = self.dut.send_expect(
                 "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'| cut -d'/' -f1" % virtual_interface, "# ", 10)
             ipv6_address = out.split('\r\n')[0]
-- 
2.33.1


             reply	other threads:[~2021-11-24  7:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 15:43 Lingli Chen [this message]
2021-11-30  3:32 ` Tu, Lijuan

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=20211124154338.132083-1-linglix.chen@intel.com \
    --to=linglix.chen@intel.com \
    --cc=dts@dpdk.org \
    /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).