* [dts][PATCH V1 0/2] eeprom dump
@ 2022-03-22 15:05 Yaqi Tang
2022-03-22 15:05 ` [dts][PATCH V1 1/2] test_plans/eeprom_dump: modify test plan for columbiaville nic Yaqi Tang
2022-03-22 15:05 ` [dts][PATCH V1 2/2] tests/eeprom_dump: modify testsuite " Yaqi Tang
0 siblings, 2 replies; 4+ messages in thread
From: Yaqi Tang @ 2022-03-22 15:05 UTC (permalink / raw)
To: ohilyard; +Cc: dts, xueqin.lin, Yaqi Tang
modify eeprom dump testplan and testsuite for columbiaville nic
Yaqi Tang (2):
test_plans/eeprom_dump
tests/eeprom_dump
test_plans/eeprom_dump_test_plan.rst | 8 +++----
tests/TestSuite_eeprom_dump.py | 32 ++++++++++++++++++++++------
2 files changed, 30 insertions(+), 10 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V1 1/2] test_plans/eeprom_dump: modify test plan for columbiaville nic
2022-03-22 15:05 [dts][PATCH V1 0/2] eeprom dump Yaqi Tang
@ 2022-03-22 15:05 ` Yaqi Tang
2022-03-22 15:05 ` [dts][PATCH V1 2/2] tests/eeprom_dump: modify testsuite " Yaqi Tang
1 sibling, 0 replies; 4+ messages in thread
From: Yaqi Tang @ 2022-03-22 15:05 UTC (permalink / raw)
To: ohilyard; +Cc: dts, xueqin.lin, Yaqi Tang
If nic is columbiaville, eeprom_dump compare the output of the first 1000 lines from testpmd and ethtool,
module_eeprom_dump compare the output of the first 16 lines from testpmd and ethtool.
Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
---
test_plans/eeprom_dump_test_plan.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test_plans/eeprom_dump_test_plan.rst b/test_plans/eeprom_dump_test_plan.rst
index 3923f3fc..6470297a 100644
--- a/test_plans/eeprom_dump_test_plan.rst
+++ b/test_plans/eeprom_dump_test_plan.rst
@@ -68,8 +68,8 @@ Test Case : EEPROM Dump
ethtool -e <interface_name> raw on length <length> >> <file_name>.txt
-3. Store the output from testpmd and ethtool into two files, then compare both files.
- Verify they are the same.
+3. If nic is columbiaville, store the output of the first 1000 lines from testpmd and ethtool into two files,
+ else store the output from testpmd and ethtool into two files. Then compare both files, verify they are the same.
4. Delete all the files created during testing.
@@ -86,7 +86,7 @@ Test Case : Module EEPROM Dump
ethtool -m <interface_name> raw on length <length> >> <file_name>.txt
-3. Store the output from testpmd and ethtool into two files, then compare both files.
- Verify they are the same.
+3. If nic is columbiaville, store the output of the first 16 lines from testpmd and ethtool into two files,
+ else store the output from testpmd and ethtool into two files. Then compare both files, verify they are the same.
4. Delete all the files created during testing.
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V1 2/2] tests/eeprom_dump: modify testsuite for columbiaville nic
2022-03-22 15:05 [dts][PATCH V1 0/2] eeprom dump Yaqi Tang
2022-03-22 15:05 ` [dts][PATCH V1 1/2] test_plans/eeprom_dump: modify test plan for columbiaville nic Yaqi Tang
@ 2022-03-22 15:05 ` Yaqi Tang
2022-03-23 7:20 ` lijuan.tu
1 sibling, 1 reply; 4+ messages in thread
From: Yaqi Tang @ 2022-03-22 15:05 UTC (permalink / raw)
To: ohilyard; +Cc: dts, xueqin.lin, Yaqi Tang
If nic is columbiaville, eeprom_dump compare the output of the first 1000 lines from testpmd and ethtool,
module_eeprom_dump compare the output of the first 16 lines from testpmd and ethtool.
Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
---
tests/TestSuite_eeprom_dump.py | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_eeprom_dump.py b/tests/TestSuite_eeprom_dump.py
index 236609e0..dc665219 100644
--- a/tests/TestSuite_eeprom_dump.py
+++ b/tests/TestSuite_eeprom_dump.py
@@ -34,6 +34,7 @@
DPDK Test suite.
"""
import re
+import time
import framework.utils as utils
from framework.pmd_output import PmdOutput
@@ -69,18 +70,35 @@ class TestEEPROMDump(TestCase):
self.verify(not result, "Testpmd dumped is not same as linux dumped")
- def dump_to_file(self, regex, get, to):
+ def dump_to_file(self, regex, get, to, testname):
+ # if nic is columbiaville, eeprom_dump get testpmd output of the first 1000 lines,
+ # module_eeprom_dump get testpmd output of the first 16 lines.
+ if self.nic in ["columbiaville_25g", "columbiaville_100g"]:
+ if testname == "eeprom":
+ count = 1000
+ elif testname == "module_eeprom":
+ count = 16
+ n=0
+ # Get testpmd output to have only hex value
+ for line in re.findall(regex, get):
+ n= n+1
+ if n <= count:
+ line = line.replace(" ", "").lower()
+ self.dut.send_expect(f"echo {line} >> {to}", "#")
+
# Get testpmd output to have only hex value
- for line in re.findall(regex, get):
- line = line.replace(" ", "").lower()
- self.dut.send_expect(f"echo {line} >> {to}", "#")
+ else:
+ for line in re.findall(regex, get):
+ line = line.replace(" ", "").lower()
+ self.dut.send_expect(f"echo {line} >> {to}", "#")
def check_output(self, testname, ethcommand):
self.pmdout.start_testpmd("Default")
portsinfo = []
for port in self.ports:
- pmdout = self.dut.send_expect(f"show port {port} {testname}", "testpmd>")
+ # show port {port} eeprom has 10485760 bytes, and it takes about 13 minutes to show finish.
+ pmdout = self.dut.send_expect(f"show port {port} {testname}", "testpmd>", timeout=800)
self.verify("Finish --" in pmdout, f"{testname} dump failed")
# get length from testpmd outout
@@ -112,6 +130,7 @@ class TestEEPROMDump(TestCase):
r"(?<=: )(.*)(?= \| )",
portinfo["pmdout"],
f"testpmd_{testname}_{port}.txt",
+ testname,
)
self.dut.send_expect(
@@ -127,9 +146,10 @@ class TestEEPROMDump(TestCase):
)
self.dump_to_file(
- r"(?<=: )(.*)(?= )",
+ r"(?<=: )(.*?)(?= )",
portinfo["ethout"],
f"ethtool_{testname}_{port}.txt",
+ testname,
)
# Compare the files and delete the files after
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V1 2/2] tests/eeprom_dump: modify testsuite for columbiaville nic
2022-03-22 15:05 ` [dts][PATCH V1 2/2] tests/eeprom_dump: modify testsuite " Yaqi Tang
@ 2022-03-23 7:20 ` lijuan.tu
0 siblings, 0 replies; 4+ messages in thread
From: lijuan.tu @ 2022-03-23 7:20 UTC (permalink / raw)
To: ohilyard, Yaqi Tang; +Cc: dts, xueqin.lin, Yaqi Tang
On Tue, 22 Mar 2022 23:05:23 +0800, Yaqi Tang <yaqi.tang@intel.com> wrote:
> If nic is columbiaville, eeprom_dump compare the output of the first 1000 lines from testpmd and ethtool,
> module_eeprom_dump compare the output of the first 16 lines from testpmd and ethtool.
>
> Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-23 7:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 15:05 [dts][PATCH V1 0/2] eeprom dump Yaqi Tang
2022-03-22 15:05 ` [dts][PATCH V1 1/2] test_plans/eeprom_dump: modify test plan for columbiaville nic Yaqi Tang
2022-03-22 15:05 ` [dts][PATCH V1 2/2] tests/eeprom_dump: modify testsuite " Yaqi Tang
2022-03-23 7:20 ` lijuan.tu
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).