From owner-svn-src-head@freebsd.org Wed Jan 29 16:47:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3B071F5D24; Wed, 29 Jan 2020 16:47:28 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4878Xw4G3Qz3K9c; Wed, 29 Jan 2020 16:47:28 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f181.google.com with SMTP id k15so135138ybd.10; Wed, 29 Jan 2020 08:47:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vCZS5nSzgkkcF5JUz9cRu5tvGxHd+K6dF0UB92kVrpE=; b=evYWm7kc1lkHsYGaODn8TJKpjuygemwhtkS56CZFYsz38z8/ezbbdQsGMgt8ZsbLYX ZsOu8oUCyo3e9jaqC1O/SbMX+JnFuGk29BZCm8w2bGF80kXz3iJVc2xwFLX+yT23yCVl zC2BjpftkxPMwiGzxFAXP3iPkoWj3bak5QDei3Ztzbt9ToZ1yLPB6I5R17UwQ766Z0Gu ZBisUZCetoAPPO2VL1B4jvqyBs8UEzo8dCTrBincyYQlmNbHxJhRqulwTM1RvbQaDHjR V3zVgu8fM5DnaDeGvX1jf6Lp8dbTh4SzOoyvv/JLEjaGJJc+0w7ieLrg0REAHZMRMbMl xWYw== X-Gm-Message-State: APjAAAUUeGBSW0HID9PitTaW8ilfOe5HZHIIvq3L3KDGMwhqg/gJctkR gJ2p90xRIOnqItx2l+H1iVfFTmhAeZa84yTYM4I9iRlA X-Google-Smtp-Source: APXvYqwj4Pas7LHL33iPydxZeet0crYpydVZviMt7U5pKqMnNPqafsLRID9BTPhhUccFZmkoPwlD6FxEgTMcF0/1Vlc= X-Received: by 2002:a05:6902:4c8:: with SMTP id v8mr265912ybs.451.1580316447049; Wed, 29 Jan 2020 08:47:27 -0800 (PST) MIME-Version: 1.0 References: <202001290525.00T5PKKh017113@repo.freebsd.org> In-Reply-To: <202001290525.00T5PKKh017113@repo.freebsd.org> From: Li-Wen Hsu Date: Thu, 30 Jan 2020 00:09:51 +0800 Message-ID: Subject: Re: svn commit: r357246 - head/tests/sys/sys To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4878Xw4G3Qz3K9c X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jan 2020 16:47:28 -0000 On Wed, Jan 29, 2020 at 1:25 PM Conrad Meyer 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