DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] raw/skeleton: fix return value check
@ 2021-04-22  6:21 Min Hu (Connor)
  2021-05-12 14:29 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Min Hu (Connor) @ 2021-04-22  6:21 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, nipun.gupta, hemant.agrawal

This patch adds return value check for setting an attribute.

Fixes: 88a81bcecb7b ("raw/skeleton: remove compile-time constant for device id")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/raw/skeleton/skeleton_rawdev_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index 1405df0..484468e 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -295,6 +295,7 @@ test_rawdev_attr_set_get(void)
 	dummy_value = &set_value;
 	*dummy_value = 200;
 	ret = rte_rawdev_set_attr(test_dev_id, "Test2", (uintptr_t)dummy_value);
+	RTE_TEST_ASSERT(!ret, "Unable to set an attribute (Test2)");
 
 	/* Check if attributes have been set */
 	ret = rte_rawdev_get_attr(test_dev_id, "Test1", &ret_value);
-- 
2.7.4


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

end of thread, other threads:[~2021-05-12 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  6:21 [dpdk-dev] [PATCH] raw/skeleton: fix return value check Min Hu (Connor)
2021-05-12 14:29 ` Thomas Monjalon

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