MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_reorder_free

Function test_reorder_free

dpdk/app/test/test_reorder.c:109–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static int
110test_reorder_free(void)
111{
112 struct rte_reorder_buffer *b1 = NULL, *b2 = NULL;
113 const char *name = "test_free";
114
115 b1 = rte_reorder_create(name, rte_socket_id(), 8);
116 TEST_ASSERT_NOT_NULL(b1, "Failed to create reorder buffer.");
117
118 b2 = rte_reorder_find_existing(name);
119 TEST_ASSERT_EQUAL(b1, b2, "Failed to find existing reorder buffer");
120
121 rte_reorder_free(b1);
122
123 b2 = rte_reorder_find_existing(name);
124 TEST_ASSERT((b2 == NULL) && (rte_errno == ENOENT),
125 "Found previously freed reorder buffer");
126
127 return 0;
128}
129
130static int
131test_reorder_insert(void)

Callers

nothing calls this directly

Calls 4

rte_reorder_createFunction · 0.85
rte_socket_idFunction · 0.85
rte_reorder_freeFunction · 0.85

Tested by

no test coverage detected