diff mbox series

raw/skeleton: fix return value check

Message ID 1619072506-48243-1-git-send-email-humin29@huawei.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series raw/skeleton: fix return value check | expand

Checks

Context Check Description
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) April 22, 2021, 6:21 a.m. UTC
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(+)

Comments

Thomas Monjalon May 12, 2021, 2:29 p.m. UTC | #1
22/04/2021 08:21, Min Hu (Connor):
> 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>
> ---
>  	ret = rte_rawdev_set_attr(test_dev_id, "Test2", (uintptr_t)dummy_value);
> +	RTE_TEST_ASSERT(!ret, "Unable to set an attribute (Test2)");

Applied with title
"raw/skeleton: add missing check after setting attribute"
thanks
diff mbox series

Patch

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