Date: Thu, 30 Jan 2020 00:09:51 +0800 From: Li-Wen Hsu <lwhsu@freebsd.org> To: Conrad Meyer <cem@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r357246 - head/tests/sys/sys Message-ID: <CAKBkRUxs860g1zYXHJybA-ggtd31Ry41wdT-%2BpjHD2nrwcyJXA@mail.gmail.com> In-Reply-To: <202001290525.00T5PKKh017113@repo.freebsd.org> References: <202001290525.00T5PKKh017113@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 29, 2020 at 1:25 PM Conrad Meyer <cem@freebsd.org> wrote: > > Author: cem > Date: Wed Jan 29 05:25:20 2020 > New Revision: 357246 > URL: https://svnweb.freebsd.org/changeset/base/357246 > > Log: > qmath(3) test: Replace overcomplicated abomination with arc4random(3) > > The horrific GENRAND construction bent over backwards to construct 64-bit > signed integers from the 31-bit output of random(3) for about 20 numbers per > test. Reproducibility wasn't a goal: random(3) was seeded with > srandomdev(3). Speed is not a factor for generating 20 integers with > arc4random(3). Range is not a factor: all uses did not bound the range > beyond that of the full [INT64_MIN, INT64_MAX]. Just use arc4random(3). > > Reported by: Coverity > CIDs: 1404809, 1404817, 1404838, 1404840 and about 6x other > identical reports of dubious code relating to the > construction > > Modified: > head/tests/sys/sys/qmath_test.c These two test cases are starting failing since this commit: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14110/testReport/sys.sys/qmath_test/qsubi_s64q/ https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14110/testReport/sys.sys/qmath_test/qsubq_s64q/ Can you help check them? Thanks! Li-Wen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKBkRUxs860g1zYXHJybA-ggtd31Ry41wdT-%2BpjHD2nrwcyJXA>