On 7/10/2023 7:49 AM, Chengwen Feng wrote:
This patch supports memarea test of rte_memarea_create() and
rte_memarea_destroy() API.

Signed-off-by: Chengwen Feng <[email protected]>
Reviewed-by: Dongdong Liu <[email protected]>
Acked-by: Morten Brørup <[email protected]>
---

Hi,

+       /* test for create with LIBC */
+       test_memarea_init_param(&init);
+       init.source = RTE_MEMAREA_SOURCE_LIBC;
+       ma = rte_memarea_create(&init);
+       TEST_ASSERT(ma != NULL, "Expected Non-NULL");
+       rte_memarea_destroy(ma);
+
+       return 0;

Here and in other test functions: I think TEST_SUCCESS would be the semantically correct value to return.

+}
+
+static struct unit_test_suite memarea_test_suite  = {
+       .suite_name = "Memarea Unit Test Suite",
+       .setup = NULL,
+       .teardown = NULL,
+       .unit_test_cases = {
+               TEST_CASE(test_memarea_create_bad_param),
+               TEST_CASE(test_memarea_create_destroy),
+
+               TEST_CASES_END() /**< NULL terminate unit test array */
+       }
+};
+
+static int
+test_memarea(void)
+{
+       return unit_test_suite_runner(&memarea_test_suite);
+}
+
+REGISTER_TEST_COMMAND(memarea_autotest, test_memarea);

Acked-by: Anatoly Burakov <[email protected]>

--
Thanks,
Anatoly

Reply via email to