On Fri, Dec 20, 2019 at 3:02 PM David Marchand <david.march...@redhat.com> wrote: > > We recently started to get random failures on the common_autotest ut with > clang on Ubuntu 16.04.6. > > Example: https://travis-ci.com/DPDK/dpdk/jobs/263177424 > > Wrong rte_log2_u64(0) val 0, expected ffffffff > Test Failed > > The ut passes 0 to log2() to get an expected value. > > Quoting log2 / log(3) manual: > If x is zero, then a pole error occurs, and the functions return > -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. > > rte_log2_uXX helpers handle 0 as a special value and return 0. > Let's have dedicated tests for this case. > > Fixes: 05c4345ef5c2 ("test: add unit test for integer log2 function") > Cc: sta...@dpdk.org > > Signed-off-by: David Marchand <david.march...@redhat.com> > Acked-by: Aaron Conole <acon...@redhat.com>
Applied with mentioned fix. -- David Marchand