On Fri, Feb 07, 2025 at 03:44:56PM +0800, fengchengwen wrote:
> On 2025/2/6 19:40, Bruce Richardson wrote:
> > On Fri, Jan 24, 2025 at 03:18:11PM +0800, fengchengwen wrote:
> >> The new impl don't support re-test, how about add a wrap:
> >> 1. rename test_multi_alloc_statistics with do_test_multi_alloc_statistics, 
> >> and make it take socket as parameter
> >> 2. create a new function test_multi_alloc_statistics {
> >>     // prepare a new malloc heap
> >>     ret = do_test_multi_alloc_statistics(socket);
> >>     // free the heap
> >>     return ret;
> >> }
> >>
> > 
> > Can you clarify the issues being seen on re-test? I have just run
> > malloc_autotest multiple times within the same dpdk-test instance and not
> > seen any issues.
> 
> If the middle logic fail, for example:
> 
>       if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
>                       (post_stats.heap_freesz_bytes != 
> pre_stats.heap_freesz_bytes) ||
>                       (post_stats.heap_allocsz_bytes != 
> pre_stats.heap_allocsz_bytes) ||
>                       (post_stats.alloc_count != pre_stats.alloc_count) ||
>                       (post_stats.free_count != pre_stats.free_count)) {
>               printf("Malloc statistics are incorrect - freed alloc\n");
>               return -1;
>       }
> 
> If the above if branch taken, then retest, the 
> rte_malloc_heap_create(__func__) will
> failed because already exist the heap.
> 
Ok, retest on failure is broken. Got it. Will rework.

Reply via email to