test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [dts 07/28] add unit_test_mbuf rst file into dts
@ 2015-05-26  7:35 TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 08/28] add unit_test_mempool " TangHaifeng
                   ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_mbuf_test_plan.rst |   70 ++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_mbuf_test_plan.rst

diff --git a/test_plans/unit_tests_mbuf_test_plan.rst b/test_plans/unit_tests_mbuf_test_plan.rst
new file mode 100644
index 0000000..3b0d568
--- /dev/null
+++ b/test_plans/unit_tests_mbuf_test_plan.rst
@@ -0,0 +1,70 @@
+.. Copyright (c) <2010>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==============
+Mbuf Autotests
+==============
+
+This is the test plan for the Intel® DPDK mbuf library.
+
+Description
+===========
+
+#. Allocate a mbuf pool.
+
+   - The pool contains NB_MBUF elements, where each mbuf is MBUF_SIZE
+     bytes long.
+
+#. Test multiple allocations of mbufs from this pool.
+
+   - Allocate NB_MBUF and store pointers in a table.
+   - If an allocation fails, return an error.
+   - Free all these mbufs.
+   - Repeat the same test to check that mbufs were freed correctly.
+
+#. Test data manipulation in pktmbuf.
+
+   - Alloc an mbuf.
+   - Append data using rte_pktmbuf_append().
+   - Test for error in rte_pktmbuf_append() when len is too large.
+   - Trim data at the end of mbuf using rte_pktmbuf_trim().
+   - Test for error in rte_pktmbuf_trim() when len is too large.
+   - Prepend a header using rte_pktmbuf_prepend().
+   - Test for error in rte_pktmbuf_prepend() when len is too large.
+   - Remove data at the beginning of mbuf using rte_pktmbuf_adj().
+   - Test for error in rte_pktmbuf_adj() when len is too large.
+   - Check that appended data is not corrupt.
+   - Free the mbuf.
+   - Between all these tests, check data_len and pkt_len, and
+     that the mbuf is contiguous.
+   - Repeat the test to check that allocation operations
+     reinitialize the mbuf correctly.
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 08/28] add unit_test_mempool rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 09/28] add unit_tests_pmd_perf " TangHaifeng
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_mempool_test_plan.rst |   75 +++++++++++++++++++++++++++
 1 files changed, 75 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_mempool_test_plan.rst

diff --git a/test_plans/unit_tests_mempool_test_plan.rst b/test_plans/unit_tests_mempool_test_plan.rst
new file mode 100644
index 0000000..2f4b8d6
--- /dev/null
+++ b/test_plans/unit_tests_mempool_test_plan.rst
@@ -0,0 +1,75 @@
+.. Copyright (c) <2010>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=================
+Mempool Autotests
+=================
+
+This is the test plan for the Intel® DPDK mempool library.
+
+Description
+===========
+
+#. Basic tests: done on one core with and without cache:
+
+   - Get one object, put one object
+   - Get two objects, put two objects
+   - Get all objects, test that their content is not modified and
+     put them back in the pool.
+
+#. Performance tests:
+
+   Each core get *n_keep* objects per bulk of *n_get_bulk*. Then,
+   objects are put back in the pool per bulk of *n_put_bulk*.
+
+   This sequence is done during TIME_S seconds.
+
+   This test is done on the following configurations:
+
+   - Cores configuration (*cores*)
+
+     - One core with cache
+     - Two cores with cache
+     - Max. cores with cache
+     - One core without cache
+     - Two cores without cache
+     - Max. cores without cache
+
+   - Bulk size (*n_get_bulk*, *n_put_bulk*)
+
+     - Bulk get from 1 to 32
+     - Bulk put from 1 to 32
+
+   - Number of kept objects (*n_keep*)
+
+     - 32
+     - 128
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 09/28] add unit_tests_pmd_perf rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 08/28] add unit_test_mempool " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 10/28] add unit_test_power " TangHaifeng
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_pmd_perf_test_plan.rst |   79 ++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_pmd_perf_test_plan.rst

diff --git a/test_plans/unit_tests_pmd_perf_test_plan.rst b/test_plans/unit_tests_pmd_perf_test_plan.rst
new file mode 100644
index 0000000..c9d066f
--- /dev/null
+++ b/test_plans/unit_tests_pmd_perf_test_plan.rst
@@ -0,0 +1,79 @@
+.. Copyright (c) <2014>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Prerequisites
+=============
+One 10Gb Ethernet port of the DUT is directly connected and link is up.
+
+===========================
+Continuous Mode Performance
+===========================
+
+This is the test plan for unit test to measure cycles/packet in NIC loopback
+mode.
+
+This section explains how to run the unit tests for pmd performance with 
+continues stream control mode.
+The test can be launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The final output of the test will be average cycles of IO used per packet.
+
+======================
+Burst Mode Performance
+======================
+
+This is the test plan for unit test to measure cycles/packet in NIC loopback
+mode.
+
+This section explains how to run the unit tests for pmd performance with 
+burst stream control mode. For get accurate scalar fast performance, need 
+disable INC_VECTOR in configuration file first.
+
+
+The test can be launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The final output of the test will be matrix of average cycles of IO used per
+packet.
+
+        +--------+------+--------+--------+
+        | Mode   | rxtx | rxonly | txonly |
+        +========+======+========+========+
+        | vector | 58   | 34     | 23     |
+        +--------+------+--------+--------+
+        | scalar | 89   | 51     | 38     |
+        +--------+------+--------+--------+
+        | full   | 73   | 31     | 42     |
+        +--------+------+--------+--------+
+        | hybrid | 59   | 35     | 23     |
+        +--------+------+--------+--------+
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 10/28] add unit_test_power rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 08/28] add unit_test_mempool " TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 09/28] add unit_tests_pmd_perf " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  9:01   ` Liu, Yong
  2015-05-26  7:35 ` [dts] [dts 11/28] add unit_test_qos " TangHaifeng
                   ` (17 subsequent siblings)
  20 siblings, 1 reply; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_power_test_plan.rst |   80 +++++++++++++++++++++++++++++
 1 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_power_test_plan.rst

diff --git a/test_plans/unit_tests_power_test_plan.rst b/test_plans/unit_tests_power_test_plan.rst
new file mode 100644
index 0000000..9e42444
--- /dev/null
+++ b/test_plans/unit_tests_power_test_plan.rst
@@ -0,0 +1,80 @@
+.. Copyright (c) <2010>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===============
+Power Autotests
+===============
+
+This is the test plan for the Intel® DPDK Power library.
+
+Description
+===========
+
+This section explains how to run the unit tests for Power features. The test 
+can be launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+The steps to run the unit test manually are as follow::
+
+
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff
+  RTE>> power_autotest
+  
+  
+The final output of the test has to be "Test OK"
+
+==================
+ACPI CPU Frequency
+==================
+
+This section explains how to run the unit tests for Power features. The test 
+can be launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+The steps to run the unit test manually are as follow::
+  
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff
+  RTE>> power_acpi_cpufreq_autotest
+
+The final output of the test has to be "Test OK"
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 11/28] add unit_test_qos rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (2 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 10/28] add unit_test_power " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 12/28] add unit_test_ring " TangHaifeng
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_qos_test_plan.rst |  100 +++++++++++++++++++++++++++++++
 1 files changed, 100 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_qos_test_plan.rst

diff --git a/test_plans/unit_tests_qos_test_plan.rst b/test_plans/unit_tests_qos_test_plan.rst
new file mode 100644
index 0000000..397c06a
--- /dev/null
+++ b/test_plans/unit_tests_qos_test_plan.rst
@@ -0,0 +1,100 @@
+.. Copyright (c) <2010>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+============
+RED Autotest
+============
+
+This is the test plan for the Intel® DPDK Random Early Detection feature.
+
+This section explains how to run the unit tests for RED. The test can be launched 
+independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+The steps to run the unit test manually are as follow::
+  
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff
+  RTE>> red_autotest
+
+The final output of the test has to be "Test OK"
+  
+==============
+Meter Autotest
+==============
+
+This is the test plan for the Intel® DPDK Metering feature.
+
+This section explains how to run the unit tests for Meter. The test can be launched 
+independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+The steps to run the unit test manually are as follow::
+  
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff
+  RTE>> meter_autotest
+
+The final output of the test has to be "Test OK"
+
+==================
+Scheduler Autotest
+==================
+
+This is the test plan for the Intel® DPDK Scheduler feature.
+
+This section explains how to run the unit tests for Scheduler. The test can be 
+launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+The steps to run the unit test manually are as follow::
+  
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff
+  RTE>> sched_autotest
+
+The final output of the test has to be "Test OK"
\ No newline at end of file
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 12/28] add unit_test_ring rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (3 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 11/28] add unit_test_qos " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 13/28] add unit_test_ringpmd " TangHaifeng
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_ring_test_plan.rst |  123 ++++++++++++++++++++++++++++++
 1 files changed, 123 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_ring_test_plan.rst

diff --git a/test_plans/unit_tests_ring_test_plan.rst b/test_plans/unit_tests_ring_test_plan.rst
new file mode 100644
index 0000000..9a0b2ed
--- /dev/null
+++ b/test_plans/unit_tests_ring_test_plan.rst
@@ -0,0 +1,123 @@
+.. Copyright (c) <2010>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==============
+Ring Autotests
+==============
+
+This is the test plan for the Intel® DPDK ring library.
+
+Description
+===========
+
+#. Basic tests (done on one core)
+
+   - Using single producer/single consumer functions:
+
+     - Enqueue one object, two objects, MAX_BULK objects
+     - Dequeue one object, two objects, MAX_BULK objects
+     - Check that dequeued pointers are correct
+
+   - Using multi producers/multi consumers functions:
+
+     - Enqueue one object, two objects, MAX_BULK objects
+     - Dequeue one object, two objects, MAX_BULK objects
+     - Check that dequeued pointers are correct
+
+   - Test watermark and default bulk enqueue/dequeue:
+
+     - Set watermark
+     - Set default bulk value
+     - Enqueue objects, check that -EDQUOT is returned when
+       watermark is exceeded
+     - Check that dequeued pointers are correct
+
+#. Check quota and watermark
+
+   - Start a loop on another lcore that will enqueue and dequeue
+     objects in a ring. It will monitor the value of quota (default
+     bulk count) and watermark.
+   - At the same time, change the quota and the watermark on the
+     master lcore.
+   - The slave lcore will check that bulk count changes from 4 to
+     8, and watermark changes from 16 to 32.
+
+#. Performance tests
+
+   This test is done on the following configurations:
+
+   - One core enqueuing, one core dequeuing
+   - One core enqueuing, other cores dequeuing
+   - One core dequeuing, other cores enqueuing
+   - Half of the cores enqueuing, the other half dequeuing
+
+   When only one core enqueues/dequeues, the test is done with the
+   SP/SC functions in addition to the MP/MC functions.
+
+   The test is done with different bulk size.
+
+   On each core, the test enqueues or dequeues objects during
+   TIME_S seconds. The number of successes and failures are stored on
+   each core, then summed and displayed.
+
+   The test checks that the number of enqueues is equal to the
+   number of dequeues.
+
+#. Change watermark and quota
+
+   Use the command line to change the value of quota and
+   watermark. Then dump the status of ring to check that the values
+   are correctly updated in the ring structure.
+   
+=========================
+Ring Performance Autotest
+=========================
+
+This is the test plan for the Intel®  DPDK LPM Method in IPv6.
+
+This section explains how to run the unit tests for LPM in IPv6.The test can be
+launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+The steps to run the unit test manually are as follow::
+  
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff
+  RTE>> ring_perf_autotest
+
+
+The final output of the test has to be "Test OK"
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 13/28] add unit_test_ringpmd rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (4 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 12/28] add unit_test_ring " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 14/28] add unit_test_timer " TangHaifeng
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_ringpmd_test_plan.rst |   60 +++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_ringpmd_test_plan.rst

diff --git a/test_plans/unit_tests_ringpmd_test_plan.rst b/test_plans/unit_tests_ringpmd_test_plan.rst
new file mode 100644
index 0000000..18f780c
--- /dev/null
+++ b/test_plans/unit_tests_ringpmd_test_plan.rst
@@ -0,0 +1,60 @@
+.. Copyright (c) <2014>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=================
+Ring Pmd Autotest
+=================
+
+This is the test plan for the Intel® DPDK Ring poll mode driver feature.
+
+This section explains how to run the unit tests for ring pmd. The test can be 
+launched independently using the command line interface. 
+This test is implemented as a linuxapp environment application and config 
+RTE_LIBRTE_PMD_RING should be modified to 'Y'.
+
+The complete test suite is launched automatically using a python-expect
+script (launched using ``make test``) that sends commands to
+the application and checks the results. A test report is displayed on
+stdout.
+
+Ring pmd unit test required two pair of virtual ethernet devices and one 
+virtual ethernet devices with full rx&tx functions.
+
+The steps to run the unit test manually are as follow::
+  
+  # make -C ./app/test/
+  # ./app/test/test -n 1 -c ffff --vdev='eth_ring0,nodeaction=:0:CREATE' 
+     --vdev='eth_ring0,nodeaction=:0:ATTACH' --vdev='eth_ring1,nodeaction=:0:CREATE' 
+     --vdev='eth ring2,nodeaction=:0:CREATE' --vdev='eth_ring2,nodeaction=:0:ATTACH'
+  RTE>> ring_pmd_autotest
+
+The final output of the test has to be "Test OK"
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 14/28] add unit_test_timer rst file into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (5 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 13/28] add unit_test_ringpmd " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 15/28] add unit_test_cmdline testcase " TangHaifeng
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 test_plans/unit_tests_timer_test_plan.rst |   98 +++++++++++++++++++++++++++++
 1 files changed, 98 insertions(+), 0 deletions(-)
 create mode 100644 test_plans/unit_tests_timer_test_plan.rst

diff --git a/test_plans/unit_tests_timer_test_plan.rst b/test_plans/unit_tests_timer_test_plan.rst
new file mode 100644
index 0000000..5bf96c5
--- /dev/null
+++ b/test_plans/unit_tests_timer_test_plan.rst
@@ -0,0 +1,98 @@
+.. Copyright (c) <2010>, Intel Corporation
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===============
+Timer Autotests
+===============
+
+This section describes the test plan for the timer library.
+
+Description
+===========
+
+#. Stress tests.
+
+   The objective of the timer stress tests is to check that there are no
+   race conditions in list and status management. This test launches,
+   resets and stops the timer very often on many cores at the same
+   time.
+
+   - Only one timer is used for this test.
+   - On each core, the rte_timer_manage() function is called from the main loop
+     every 3 microseconds.
+   - In the main loop, the timer may be reset (randomly, with a
+     probability of 0.5 %) 100 microseconds later on a random core, or
+     stopped (with a probability of 0.5 % also).
+   - In callback, the timer is can be reset (randomly, with a
+     probability of 0.5 %) 100 microseconds later on the same core or
+     on another core (same probability), or stopped (same
+     probability).
+
+#. Basic test.
+
+   This test performs basic functional checks of the timers. The test
+   uses four different timers that are loaded and stopped under
+   specific conditions in specific contexts.
+
+   - Four timers are used for this test.
+   - On each core, the rte_timer_manage() function is called from main loop
+     every 3 microseconds.
+
+   The autotest python script checks that the behavior is correct:
+
+   - timer0
+
+     - At initialization, timer0 is loaded by the master core, on master core in
+       "single" mode (time = 1 second).
+     - In the first 19 callbacks, timer0 is reloaded on the same core,
+       then, it is explicitly stopped at the 20th call.
+     - At t=25s, timer0 is reloaded once by timer2.
+
+   - timer1
+
+     - At initialization, timer1 is loaded by the master core, on the
+       master core in "single" mode (time = 2 seconds).
+     - In the first 9 callbacks, timer1 is reloaded on another
+       core. After the 10th callback, timer1 is not reloaded anymore.
+
+   - timer2
+
+     - At initialization, timer2 is loaded by the master core, on the
+       master core in "periodical" mode (time = 1 second).
+     - In the callback, when t=25s, it stops timer3 and reloads timer0
+       on the current core.
+
+   - timer3
+
+     - At initialization, timer3 is loaded by the master core, on
+       another core in "periodical" mode (time = 1 second).
+     - It is stopped at t=25s by timer2.
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 15/28] add unit_test_cmdline testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (6 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 14/28] add unit_test_timer " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 16/28] add unit_test_dump " TangHaifeng
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_cmdline.py |   89 +++++++++++++++++++++++++++++++++
 1 files changed, 89 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_cmdline.py

diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py
new file mode 100644
index 0000000..b3a1769
--- /dev/null
+++ b/tests/TestSuite_unit_tests_cmdline.py
@@ -0,0 +1,89 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Cmdline autotest
+
+"""
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsCmdline(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_cmdline(self):
+        """
+        Run cmdline autotests in RTE comand line.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("cmdline_autotest", "RTE>>", 10)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+        return 'SUCCESS'
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 16/28] add unit_test_dump testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (7 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 15/28] add unit_test_cmdline testcase " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 17/28] add unit_test_eal " TangHaifeng
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_dump.py |  211 ++++++++++++++++++++++++++++++++++++
 1 files changed, 211 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_dump.py

diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py
new file mode 100644
index 0000000..ce04439
--- /dev/null
+++ b/tests/TestSuite_unit_tests_dump.py
@@ -0,0 +1,211 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import re
+
+"""
+DPDK Test suite.
+
+Run Inter-VM share memory autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsDump(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        Nothing to do here.
+        """
+        # Based on h/w type, choose how many ports to use
+        self.dut_ports = self.dut.get_ports(self.nic)
+        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        Nothing to do here.
+        """
+        pass
+
+    def test_log_dump(self):
+        """
+        Run history log dump test case.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_log_history", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        self.verify("EAL" in out, "Test failed")
+
+    def test_ring_dump(self):
+        """
+        Run history log dump test case.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_ring", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        elements = ['ring', 'address', 'flags', 'size', 'ct', 'ch', 'pt', 'ph', 'used', 'avail', 'watermark']
+        match_regex = "ring <(.*?)>@0x(.*)\r\n"
+        for element in elements[2:]:
+            match_regex += "  %s=(\d*)\r\n" % element
+        m = re.compile(r"%s" % match_regex, re.S)
+        result = m.search(out)
+        ring_info = dict(zip(elements, result.groups()))
+
+        self.verify(ring_info['ring'] == 'MP_log_history', "Test failed")
+
+    def test_mempool_dump(self):
+        """
+        Run mempool dump test case.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_mempool", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        elements = ['mempool', 'address', 'flags', 'ring', 'phys_addr', 'size', 'header_size', 'elt_size',
+                    'trailer_size', 'total_obj_size', 'private_data_size', 'pg_num', 'pg_shift', 'pg_mask',
+                    'elt_va_start', 'elt_va_end', 'elt_pa\[0\]', 'avg bytes/object'
+                    ]
+        match_regex = "mempool <(.*?)>@0x(.*?)\r\n"
+        for element in elements[2:]:
+            match_regex += "  %s=(.*?)\r\n" % element
+        m = re.compile(r"%s" % match_regex, re.S)
+        result = m.search(out)
+        mempool_info = dict(zip(elements, result.groups()))
+
+        self.verify(mempool_info['mempool'] == 'log_history', "Test failed")
+
+    def test_physmem_dump(self):
+        """
+        Run physical memory dump test case.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_physmem", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        elements = ['Segment', 'phys', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank']
+        match_regex = "Segment (\d)+:"
+        for element in elements[1:-1]:
+            match_regex += " %s:(.*?)," % element
+        match_regex += " %s:(.*?)\n" % elements[-1]
+        m = re.compile(r"%s" % match_regex, re.DOTALL)
+        results = m.findall(out)
+        phy_info = []
+        for result in results:
+            phy_info.append(dict(zip(elements, result)))
+
+        self.verify(len(phy_info) > 0, "Test failed")
+
+    def test_memzone_dump(self):
+        """
+        Run memzone dump test case.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_memzone", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+
+        elements = ['Zone', 'name', 'phys', 'len', 'virt', 'socket_id', 'flags']
+        match_regex = "Zone (\d):"
+        for element in elements[1:-1]:
+            match_regex += " %s:(.*?)," % element
+        match_regex += " %s:(.*?)\n" % elements[-1]
+        m = re.compile(r"%s" % match_regex, re.DOTALL)
+        results = m.findall(out)
+
+        memzone_info = []
+        for result in results:
+            memzone_info.append(dict(zip(elements, result)))
+
+        self.verify(len(memzone_info) > 0, "Test failed")
+
+    def test_dump_struct_size(self):
+        """
+        Run struct size dump test case.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_struct_sizes", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+
+        elements = ['struct rte_mbuf', 'struct rte_mempool', 'struct rte_ring']
+        match_regex = ""
+        for element in elements[:-1]:
+            match_regex += "sizeof\(%s\) = (\d+)\r\n" % element
+        match_regex += "sizeof\(%s\) = (\d+)" % elements[-1]
+        m = re.compile(r"%s" % match_regex, re.S)
+        result = m.search(out)
+        struct_info = dict(zip(elements, result.groups()))
+
+    def test_dump_devargs(self):
+        """
+        Run devargs dump test case.
+        """
+        test_port = self.dut_ports[0]
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff -b 0000:%s"
+                             % (self.target, self.dut.ports_info[test_port]['pci']), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_devargs", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        black_str = "PCI blacklist 0000:%s" % self.dut.ports_info[test_port]['pci']
+        self.verify(black_str in out, "Dump black list failed")
+
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff -w 0000:%s"
+                             % (self.target, self.dut.ports_info[test_port]['pci']), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("dump_devargs", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+
+        white_str = "PCI whitelist 0000:%s" % self.dut.ports_info[test_port]['pci']
+        self.verify(white_str in out, "Dump white list failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        Stop application test after every case.
+        """
+        self.dut.kill_all()
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        Nothing to do here.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 17/28] add unit_test_eal testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (8 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 16/28] add unit_test_dump " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 18/28] add unit_test_ivshmem " TangHaifeng
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_eal.py |  409 +++++++++++++++++++++++++++++++++++++
 1 files changed, 409 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_eal.py

diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py
new file mode 100644
index 0000000..e36adc5
--- /dev/null
+++ b/tests/TestSuite_unit_tests_eal.py
@@ -0,0 +1,409 @@
+# <COPYRIGHT_TAG>
+
+"""
+DPDK Test suite.
+
+EAL autotest.
+
+"""
+
+import dts
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsEal(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+        [arch, machine, self.env, toolchain] = self.target.split('-')
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_version(self):
+        """
+        Run version autotest.
+        """
+
+        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("version_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_memcopy(self):
+        """
+        Run memcopy autotest.
+        """
+
+        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("memcpy_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_common(self):
+        """
+        Run common autotest.
+        """
+
+        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("common_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_eal_fs(self):
+        """
+        Run memcopy autotest.
+        """
+
+        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("eal_fs_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_memcpy(self):
+        """
+        Run memcopy autotest.
+        """
+
+        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("memcpy_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_memcpy_perf(self):
+        """
+        Run memcopy performance autotest.
+        """
+        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("memcpy_perf_autotest", "RTE>>", 240)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_hash(self):
+        """
+        Run hash autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("hash_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_hash_perf(self):
+        """
+        Run has performance autotest.
+        """
+
+        self.dut.send_expect("%s ./app/test/test -n 1 -c fffe" % self.dut.taskset(1),
+                             "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("hash_perf_autotest", "RTE>>", 600)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_malloc(self):
+        """
+        Run malloc autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("malloc_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_func_reentrancy(self):
+        """
+        Run function reentrancy autotest.
+        """
+
+        if self.dut.architecture == "x86_64":
+            cmdline = "./app/test/test -n 1 -c ffff"
+        else:
+            # mask cores only on socket 0
+            cmdline = "%s ./app/test/test -n 1 -c 5555" % self.dut.taskset(1)
+        self.dut.send_expect(cmdline, "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("func_reentrancy_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_pci(self):
+        """
+        Run pci autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("pci_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_atomic(self):
+        """
+        Run atomic autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("atomic_autotest", "RTE>>", 30)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_memory(self):
+        """
+        Run memory autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect('memory_autotest', "RTE>>", 20)
+        regexp = "phys:0x[0-9a-f]*, len:([0-9a-f]*), virt:0x[0-9a-f]*, socket_id:[0-9]*"
+        match = dts.regexp(out, regexp)
+        size = int(match, 16)
+        self.verify(size > 0, "bad size")
+        self.dut.send_expect("quit", "# ")
+
+    def test_lcore_launch(self):
+        """
+        Run lcore autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("per_lcore_autotest", "RTE>>", 20)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_spinlock(self):
+        """
+        Run spinlock autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("spinlock_autotest", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_rwlock(self):
+        """
+        Run rwlock autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("rwlock_autotest", "RTE>>", 20)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_prefetch(self):
+        """
+        Run prefetch autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("prefetch_autotest", "RTE>>", 20)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_byteorder(self):
+        """
+        Run byte order autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("byteorder_autotest", "RTE>>", 10)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_cycles(self):
+        """
+        Run cycles autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("cycles_autotest", "RTE>>", 20)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_logs(self):
+        """
+        Run logs autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("logs_autotest", "RTE>>", 10)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_memzone(self):
+        """
+        Run memzone autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("memzone_autotest", "RTE>>", 10)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_debug(self):
+        """
+        Run debug autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("debug_autotest", "RTE>>", 10)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_flags(self):
+        """
+        Run eal flags autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff -m 64", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("eal_flags_autotest", "RTE>>", 40)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_alarm(self):
+        """
+        Run alarm autotest.
+        """
+
+        self.verify(self.env == "linuxapp", "Alarm only supported in linux env")
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("alarm_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_cpuflags(self):
+        """
+        Run CPU flags autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("cpuflags_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_errno(self):
+        """
+        Run errno autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*TE>>|RT.*E>>|RTE.*>>|RTE>.*>", 20)
+        out = self.dut.send_expect("errno_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_interrupts(self):
+        """
+        Run interrupt autotest.
+        """
+
+        self.verify(self.env == "linuxapp", "Interrupt only supported in linux env")
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*TE>>|RT.*E>>|RTE.*>>|RTE>.*>", 20)
+        out = self.dut.send_expect("interrupt_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_multiprocess(self):
+        """
+        Run multiprocess autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff -m 64", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("multiprocess_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_string(self):
+        """
+        Run string autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("string_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_tailq(self):
+        """
+        Run tailq autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("tailq_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_devargs(self):
+        """
+        Run devargs autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("devargs_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_kvargs(self):
+        """
+        Run kvargs autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("kvargs_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_acl(self):
+        """
+        Run acl autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("acl_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_link_bonding(self):
+        """
+        Run acl autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("link_bonding_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 18/28] add unit_test_ivshmem testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (9 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 17/28] add unit_test_eal " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 19/28] add unit_test_kni " TangHaifeng
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_ivshmem.py |   93 +++++++++++++++++++++++++++++++++
 1 files changed, 93 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_ivshmem.py

diff --git a/tests/TestSuite_unit_tests_ivshmem.py b/tests/TestSuite_unit_tests_ivshmem.py
new file mode 100644
index 0000000..d479b53
--- /dev/null
+++ b/tests/TestSuite_unit_tests_ivshmem.py
@@ -0,0 +1,93 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Run Inter-VM share memory autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsIvshmem(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        [arch, machine, env, toolchain] = self.dut.target.split('-')
+        self.target = "%s-%s-%s-%s" % (arch, "ivshmem", env, toolchain)
+        self.verify(arch == "x86_64", "ivshmem only support x86_64")
+        self.dut.build_install_dpdk(self.target)
+
+    def set_up(self):
+        """
+        Run before each test case.
+        Nothing to do here.
+        """
+        pass
+
+    def test_ivshmem(self):
+        """
+        Run Inter-VM share memory test.
+        """
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("ivshmem_autotest", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        Nothing to do here.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        Remove ivshmem tempory folder
+        """
+        self.dut.send_expect("rm -rf " + self.target, "#")
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 19/28] add unit_test_kni testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (10 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 18/28] add unit_test_ivshmem " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 20/28] add unit_test_lpm " TangHaifeng
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_kni.py |  106 +++++++++++++++++++++++++++++++++++++
 1 files changed, 106 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_kni.py

diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py
new file mode 100644
index 0000000..ec5f3e0
--- /dev/null
+++ b/tests/TestSuite_unit_tests_kni.py
@@ -0,0 +1,106 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+This TestSuite runs the unit tests included in DPDK for KNI feature.
+"""
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsKni(TestCase):
+
+    #
+    #
+    # Utility methods and other non-test code.
+    #
+
+    def insmod_kni(self):
+
+        out = self.dut.send_expect('lsmod | grep rte_kni', "# ")
+
+        if "rte_kni" in out:
+            self.dut.send_expect('rmmod rte_kni.ko', "# ")
+
+        out = self.dut.send_expect('insmod ./%s/kmod/rte_kni.ko lo_mode=lo_mode_fifo' % (self.target), "# ")
+
+        self.verify("Error" not in out, "Error loading KNI module: " + out)
+
+    #
+    #
+    #
+    # Test cases.
+    #
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+
+        KNI Prerequisites
+        """
+        out = self.dut.send_expect("make -C ./app/test/", "# ", 120)
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+        self.insmod_kni()
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_kni(self):
+        """
+        Run kni autotest.
+        """
+        self.dut.send_expect("./app/test/test -n 1 -c fffe", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("kni_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+
+        self.verify('Test OK' in out, 'Test Failed')
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        self.dut.send_expect("rmmod rte_kni", "# ", 5)
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 20/28] add unit_test_lpm testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (11 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 19/28] add unit_test_kni " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 21/28] add unit_test_mbuf " TangHaifeng
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_lpm.py |  108 +++++++++++++++++++++++++++++++++++++
 1 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_lpm.py

diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py
new file mode 100644
index 0000000..b638195
--- /dev/null
+++ b/tests/TestSuite_unit_tests_lpm.py
@@ -0,0 +1,108 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+This TestSuite runs the unit tests included in DPDK for LPM methods in l3fwd.
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsLpmIpv6(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+
+
+        Qos Prerequisites
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_lpm(self):
+        """
+        Run lpm for IPv6 autotest.
+        """
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("lpm_autotest", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_lpm_ipv6(self):
+        """
+        Run lpm for IPv6 autotest.
+        """
+        [arch, machine, env, toolchain] = self.target.split('-')
+        self.verify(arch == "x86_64", "lpm6 request huge memory")
+
+        hugepage_ori = self.dut.get_total_huge_pages()
+        self.dut.set_huge_pages(4096)
+        hugepage_num = self.dut.get_total_huge_pages()
+        self.verify(hugepage_num >= 4096, "failed to request huge memory")
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
+        self.dut.send_expect("quit", "# ")
+        self.dut.set_huge_pages(hugepage_ori)
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 21/28] add unit_test_mbuf testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (12 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 20/28] add unit_test_lpm " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 22/28] add unit_test_mempool " TangHaifeng
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_mbuf.py |   88 ++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_mbuf.py

diff --git a/tests/TestSuite_unit_tests_mbuf.py b/tests/TestSuite_unit_tests_mbuf.py
new file mode 100644
index 0000000..bc7ea3b
--- /dev/null
+++ b/tests/TestSuite_unit_tests_mbuf.py
@@ -0,0 +1,88 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Run all mbuf autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsMbuf(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_mbuf(self):
+        """
+        Run mbuf autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("mbuf_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 22/28] add unit_test_mempool testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (13 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 21/28] add unit_test_mbuf " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 23/28] add unit_test_pmd " TangHaifeng
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_mempool.py |   97 +++++++++++++++++++++++++++++++++
 1 files changed, 97 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_mempool.py

diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py
new file mode 100644
index 0000000..e88795b
--- /dev/null
+++ b/tests/TestSuite_unit_tests_mempool.py
@@ -0,0 +1,97 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Run all Mempool autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsMempool(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_mempool(self):
+        """
+        Run memory pool autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("mempool_autotest", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_mempool_perf(self):
+        """
+        Run memory pool performance autotest.
+        """
+        self.dut.send_expect("./app/test/test -n 1 -c fffe", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 700)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 23/28] add unit_test_pmd testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (14 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 22/28] add unit_test_mempool " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 24/28] add unit_test_power " TangHaifeng
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_pmd_perf.py |  146 ++++++++++++++++++++++++++++++++
 1 files changed, 146 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_pmd_perf.py

diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
new file mode 100644
index 0000000..8745227
--- /dev/null
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -0,0 +1,146 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+This TestSuite runs the unit tests included in DPDK for pmd performance.
+"""
+
+import dts
+import re
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsPmdPerf(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+
+        Power Prerequisites
+        """
+        self.dut_ports = self.dut.get_ports(self.nic)
+        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
+        [self.arch, machine, env, toolchain] = self.target.split('-')
+        self.verify(self.arch == "x86_64", "pmd perf request running in x86_64")
+        self.burst_ctlmodes = ['poll_before_xmit', 'poll_after_xmit']
+        self.rxtx_modes = ['vector', 'scalar', 'full', 'hybrid']
+        self.anchors = ['rxtx', 'rxonly', 'txonly']
+
+        # for better scalar performance data, need disble CONFIG_RTE_IXGBE_INC_VECTOR
+        [arch, machine, env, toolchain] = self.target.split('-')
+        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/' config/common_%s" % env, "# ", 30)
+        self.dut.build_install_dpdk(self.target)
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+        self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "# ")
+        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/' config/common_%s" % env, "# ", 30)
+        self.dut.build_install_dpdk(self.target)
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_pmd_burst(self):
+        """
+        Run pmd stream control mode burst test case.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        for mode in self.burst_ctlmodes:
+            self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 5)
+            out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 60)
+            match_regex = "Result: (\d+) cycles per packet"
+            m = re.compile(r"%s" % match_regex, re.S)
+            result = m.search(out)
+            self.logger.info("Mode %s latency is %s" % (mode, result.group(1)))
+
+        self.dut.send_expect("quit", "# ")
+
+    def test_pmd_continues(self):
+        """
+        Run pmd stream control mode continues test case.
+        """
+
+        self.table_header = ['Mode']
+        self.table_header += self.anchors
+        dts.results_table_add_header(self.table_header)
+        print self.table_header
+
+        for mode in self.rxtx_modes:
+            if mode is "scalar":
+                self.dut.send_expect("./app/test/test_scalar -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+            else:
+                self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+
+            table_row = [mode]
+            self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 5)
+            self.dut.send_expect("set_rxtx_mode %s" % mode, "RTE>>", 5)
+            for anchor in self.anchors:
+                self.dut.send_expect("set_rxtx_anchor %s" % anchor, "RTE>>", 5)
+                out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 60)
+                match_regex = "Result: (\d+) cycles per packet"
+                m = re.compile(r"%s" % match_regex, re.S)
+                result = m.search(out)
+                table_row.append(result.group(1))
+
+            self.dut.send_expect("quit", "# ")
+            dts.results_table_add_row(table_row)
+
+        dts.results_table_print()
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 24/28] add unit_test_power testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (15 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 23/28] add unit_test_pmd " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 25/28] add unit_test_qos " TangHaifeng
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_power.py |   99 +++++++++++++++++++++++++++++++++++
 1 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_power.py

diff --git a/tests/TestSuite_unit_tests_power.py b/tests/TestSuite_unit_tests_power.py
new file mode 100644
index 0000000..3c0c230
--- /dev/null
+++ b/tests/TestSuite_unit_tests_power.py
@@ -0,0 +1,99 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+This TestSuite runs the unit tests included in DPDK for power feature.
+"""
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsPower(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+
+        Power Prerequisites
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_power(self):
+        """
+        Run power autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("power_autotest", "RTE>>", 5)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_power_acpi(self):
+        """
+        Run power acpi cpu frequency autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("power_acpi_cpufreq_autotest", "RTE>>", 5)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 25/28] add unit_test_qos testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (16 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 24/28] add unit_test_power " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 26/28] add unit_test_ring " TangHaifeng
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_qos.py |  113 +++++++++++++++++++++++++++++++++++++
 1 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_qos.py

diff --git a/tests/TestSuite_unit_tests_qos.py b/tests/TestSuite_unit_tests_qos.py
new file mode 100644
index 0000000..5b8e023
--- /dev/null
+++ b/tests/TestSuite_unit_tests_qos.py
@@ -0,0 +1,113 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+This TestSuite runs the unit tests included in DPDK for Random Early
+Detection, Metering and Scheduling QoS features.
+"""
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsQos(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+
+        Qos Prerequisites
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_red(self):
+        """
+        Run RED autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("red_autotest", "RTE>>", 180)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_meter(self):
+        """
+        Run meter autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("meter_autotest", "RTE>>", 5)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_sched(self):
+        """
+        Run sched autotest.
+        """
+
+        [arch, machine, env, toolchain] = self.target.split('-')
+        self.verify(arch == "x86_64", "Sched auto_test not support in i686")
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("sched_autotest", "RTE>>", 5)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 26/28] add unit_test_ring testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (17 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 25/28] add unit_test_qos " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 27/28] add unit_test_ringpmd " TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 28/28] add unit_tests_timer " TangHaifeng
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_ring.py |  101 ++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_ring.py

diff --git a/tests/TestSuite_unit_tests_ring.py b/tests/TestSuite_unit_tests_ring.py
new file mode 100644
index 0000000..cae07ef
--- /dev/null
+++ b/tests/TestSuite_unit_tests_ring.py
@@ -0,0 +1,101 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Run all Ring autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsRing(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_ring(self):
+        """
+        Run ring autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("ring_autotest", "RTE>>", 36000)
+        self.verify("Test OK" in out, "Test failed")
+        self.dut.send_expect("set_watermark test 100", "RTE>>")
+        out = self.dut.send_expect("dump_ring test", "RTE>>")
+        self.dut.send_expect("quit", "# ")
+        self.verify("watermark=100" in out, "Test failed")
+
+    def test_ring_performance(self):
+        """
+        Run ring performance autotest.
+        """
+
+        self.dut.send_expect("./app/test/test -n 1 -c fffe", "R.*T.*E.*>.*>", 30)
+        out = self.dut.send_expect("ring_perf_autotest", "RTE>>", 210)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 27/28] add unit_test_ringpmd testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (18 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 26/28] add unit_test_ring " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  2015-05-26  7:35 ` [dts] [dts 28/28] add unit_tests_timer " TangHaifeng
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_ringpmd.py |  103 +++++++++++++++++++++++++++++++++
 1 files changed, 103 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_ringpmd.py

diff --git a/tests/TestSuite_unit_tests_ringpmd.py b/tests/TestSuite_unit_tests_ringpmd.py
new file mode 100644
index 0000000..7f88482
--- /dev/null
+++ b/tests/TestSuite_unit_tests_ringpmd.py
@@ -0,0 +1,103 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Run Inter-VM share memory autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsRingPmd(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        Nothing to do here.
+        """
+        self.ring_ports = [{'mode': 'tx', 'index': '0'},
+                           {'mode': 'rx', 'index': '0'},
+                           {'mode': 'rxtx', 'index': '1'},
+                           {'mode': 'tx', 'index': '2'},
+                           {'mode': 'rx', 'index': '2'}]
+
+    def set_up(self):
+        """
+        Run before each test case.
+        Nothing to do here.
+        """
+        pass
+
+    def test_ring_pmd(self):
+        """
+        Run Inter-VM share memory test.
+        """
+        dev_str = ""
+        for port in self.ring_ports:
+            if port['mode'] == 'tx':
+                dev_str += "--vdev='eth_ring%s,nodeaction=:0:CREATE' " % port['index']
+            elif port['mode'] == 'rx':
+                dev_str += "--vdev='eth_ring%s,nodeaction=:0:ATTACH' " % port['index']
+            else:
+                dev_str += "--vdev='eth_ring%s,nodeaction=:0:CREATE' " % port['index']
+
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff %s" % (self.target, dev_str), "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        Nothing to do here.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        Nothing to do here.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dts] [dts 28/28] add unit_tests_timer testcase into dts
  2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
                   ` (19 preceding siblings ...)
  2015-05-26  7:35 ` [dts] [dts 27/28] add unit_test_ringpmd " TangHaifeng
@ 2015-05-26  7:35 ` TangHaifeng
  20 siblings, 0 replies; 23+ messages in thread
From: TangHaifeng @ 2015-05-26  7:35 UTC (permalink / raw)
  To: dts; +Cc: jingguox.fu

---
 tests/TestSuite_unit_tests_timer.py |   96 +++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100644 tests/TestSuite_unit_tests_timer.py

diff --git a/tests/TestSuite_unit_tests_timer.py b/tests/TestSuite_unit_tests_timer.py
new file mode 100644
index 0000000..70d26b2
--- /dev/null
+++ b/tests/TestSuite_unit_tests_timer.py
@@ -0,0 +1,96 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   * Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#   * Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#   * Neither the name of Intel Corporation nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+DPDK Test suite.
+
+Run all timer autotests
+"""
+
+
+from test_case import TestCase
+
+#
+#
+# Test class.
+#
+
+
+class TestUnitTestsTimer(TestCase):
+
+    #
+    #
+    #
+    # Test cases.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+        out = self.dut.build_dpdk_apps('./app/test/')
+        self.verify('make: Leaving directory' in out, "Compilation failed")
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        pass
+
+    def test_timer(self):
+        """
+        Run timer autotest.
+        """
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("timer_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def test_timer_perf(self):
+        """
+        Run timer autotest.
+        """
+        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 10)
+        out = self.dut.send_expect("timer_perf_autotest", "RTE>>", 60)
+        self.dut.send_expect("quit", "# ")
+        self.verify("Test OK" in out, "Test failed")
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        pass
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dts] [dts 10/28] add unit_test_power rst file into dts
  2015-05-26  7:35 ` [dts] [dts 10/28] add unit_test_power " TangHaifeng
@ 2015-05-26  9:01   ` Liu, Yong
  0 siblings, 0 replies; 23+ messages in thread
From: Liu, Yong @ 2015-05-26  9:01 UTC (permalink / raw)
  To: Tang, HaifengX, dts; +Cc: Fu, JingguoX

Haifeng, some small comments below.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of TangHaifeng
> Sent: Tuesday, May 26, 2015 3:36 PM
> To: dts@dpdk.org
> Cc: Fu, JingguoX
> Subject: [dts] [dts 10/28] add unit_test_power rst file into dts
> 
> ---
>  test_plans/unit_tests_power_test_plan.rst |   80
> +++++++++++++++++++++++++++++
>  1 files changed, 80 insertions(+), 0 deletions(-)
>  create mode 100644 test_plans/unit_tests_power_test_plan.rst
> 
> diff --git a/test_plans/unit_tests_power_test_plan.rst
> b/test_plans/unit_tests_power_test_plan.rst
> new file mode 100644
> index 0000000..9e42444
> --- /dev/null
> +++ b/test_plans/unit_tests_power_test_plan.rst
> @@ -0,0 +1,80 @@
> +.. Copyright (c) <2010>, Intel Corporation

Please take care of the date should be 2015.

> +   All rights reserved.
> +
> +   Redistribution and use in source and binary forms, with or without
> +   modification, are permitted provided that the following conditions
> +   are met:
> +
> +   - Redistributions of source code must retain the above copyright
> +     notice, this list of conditions and the following disclaimer.
> +
> +   - Redistributions in binary form must reproduce the above copyright
> +     notice, this list of conditions and the following disclaimer in
> +     the documentation and/or other materials provided with the
> +     distribution.
> +
> +   - Neither the name of Intel Corporation nor the names of its
> +     contributors may be used to endorse or promote products derived
> +     from this software without specific prior written permission.
> +
> +   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> +   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> +   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> +   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
> +   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> +   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> +   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> +   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> +   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
> +   OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +===============
> +Power Autotests
> +===============
> +
> +This is the test plan for the Intel® DPDK Power library.
> +
> +Description
> +===========
> +
> +This section explains how to run the unit tests for Power features. The
> test
> +can be launched independently using the command line interface.
> +This test is implemented as a linuxapp environment application.
> +
> +The complete test suite is launched automatically using a python-expect
> +script (launched using ``make test``) that sends commands to
> +the application and checks the results. A test report is displayed on
> +stdout.
> +
> +The steps to run the unit test manually are as follow::
> +
> +
> +  # make -C ./app/test/
> +  # ./app/test/test -n 1 -c ffff
> +  RTE>> power_autotest
> +
> +
> +The final output of the test has to be "Test OK"
> +
> +==================
> +ACPI CPU Frequency
> +==================
> +

I remember ACPI autotest request speedStep feature on in BIOS.
Please add prerequisites of this case. 

    - Enable Enhanced Intel SpeedStep(R) Tech
    - Enable Processor C3
    - Enable Processor C6

> +This section explains how to run the unit tests for Power features. The
> test
> +can be launched independently using the command line interface.
> +This test is implemented as a linuxapp environment application.
> +
> +The complete test suite is launched automatically using a python-expect
> +script (launched using ``make test``) that sends commands to
> +the application and checks the results. A test report is displayed on
> +stdout.
> +
> +The steps to run the unit test manually are as follow::
> +
> +  # make -C ./app/test/
> +  # ./app/test/test -n 1 -c ffff
> +  RTE>> power_acpi_cpufreq_autotest
> +
> +The final output of the test has to be "Test OK"
> --
> 1.7.4.4


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-05-26  9:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26  7:35 [dts] [dts 07/28] add unit_test_mbuf rst file into dts TangHaifeng
2015-05-26  7:35 ` [dts] [dts 08/28] add unit_test_mempool " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 09/28] add unit_tests_pmd_perf " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 10/28] add unit_test_power " TangHaifeng
2015-05-26  9:01   ` Liu, Yong
2015-05-26  7:35 ` [dts] [dts 11/28] add unit_test_qos " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 12/28] add unit_test_ring " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 13/28] add unit_test_ringpmd " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 14/28] add unit_test_timer " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 15/28] add unit_test_cmdline testcase " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 16/28] add unit_test_dump " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 17/28] add unit_test_eal " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 18/28] add unit_test_ivshmem " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 19/28] add unit_test_kni " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 20/28] add unit_test_lpm " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 21/28] add unit_test_mbuf " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 22/28] add unit_test_mempool " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 23/28] add unit_test_pmd " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 24/28] add unit_test_power " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 25/28] add unit_test_qos " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 26/28] add unit_test_ring " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 27/28] add unit_test_ringpmd " TangHaifeng
2015-05-26  7:35 ` [dts] [dts 28/28] add unit_tests_timer " TangHaifeng

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).