test/ring: fix memory dump
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Sun, 25 Oct 2020 05:45:54 +0000 (00:45 -0500)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 29 Oct 2020 13:13:31 +0000 (14:13 +0100)
Pass the correct number of bytes to dump the memory.

Fixes: bf28df24e915 ("test/ring: add contention stress test")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/test/test_ring_stress_impl.h

index 3b9a480..f9ca63b 100644 (file)
@@ -159,7 +159,7 @@ check_updt_elem(struct ring_elem *elm[], uint32_t num,
                                "offending object: %p\n",
                                __func__, rte_lcore_id(), num, i, elm[i]);
                        rte_memdump(stdout, "expected", check, sizeof(*check));
-                       rte_memdump(stdout, "result", elm[i], sizeof(elm[i]));
+                       rte_memdump(stdout, "result", elm[i], sizeof(*elm[i]));
                        rte_spinlock_unlock(&dump_lock);
                        return -EINVAL;
                }