summaryrefslogtreecommitdiff
path: root/test/test
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>2018-09-05 19:53:31 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-10-01 16:49:24 +0200
commit6fe63a3d7ccc2e2376182f663251f42add77ec40 (patch)
treef30485999851f199e3264404cea891b358dfe76f /test/test
parent1638261a69b906eb56b871549bf4a64676d82d9f (diff)
downloaddpdk-6fe63a3d7ccc2e2376182f663251f42add77ec40.zip
dpdk-6fe63a3d7ccc2e2376182f663251f42add77ec40.tar.gz
dpdk-6fe63a3d7ccc2e2376182f663251f42add77ec40.tar.xz
test/event: check burst mode capability
Enqueue, dequeue depths are only valid for event devs that have burst mode capability. Check event dev capability before testing depth boundary. Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Diffstat (limited to 'test/test')
-rw-r--r--test/test/test_eventdev.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index 04bdc6b..00d7327 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -190,15 +190,18 @@ test_eventdev_configure(void)
"Config negative test failed");
TEST_ASSERT_EQUAL(-EINVAL,
test_ethdev_config_run(&dev_conf, &info, max_event_queue_flows),
- "Config negative test failed");
- TEST_ASSERT_EQUAL(-EINVAL,
- test_ethdev_config_run(&dev_conf, &info,
- max_event_port_dequeue_depth),
- "Config negative test failed");
- TEST_ASSERT_EQUAL(-EINVAL,
- test_ethdev_config_run(&dev_conf, &info,
- max_event_port_enqueue_depth),
- "Config negative test failed");
+ "Config negative test failed");
+
+ if (info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE) {
+ TEST_ASSERT_EQUAL(-EINVAL,
+ test_ethdev_config_run(&dev_conf, &info,
+ max_event_port_dequeue_depth),
+ "Config negative test failed");
+ TEST_ASSERT_EQUAL(-EINVAL,
+ test_ethdev_config_run(&dev_conf, &info,
+ max_event_port_enqueue_depth),
+ "Config negative test failed");
+ }
/* Positive case */
devconf_set_default_sane_values(&dev_conf, &info);