Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glzbK-0004sT-Lv for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2019 17:12:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1glzbJ-0007DA-Fy for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2019 17:12:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glzbJ-0007D2-8g for pgsql-hackers@lists.postgresql.org; Tue, 22 Jan 2019 17:12:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glzbH-0007rr-0N for pgsql-hackers@lists.postgresql.org; Tue, 22 Jan 2019 17:12:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0MHCTAJ011102; Tue, 22 Jan 2019 12:12:29 -0500 From: Tom Lane To: Fabien COELHO cc: PostgreSQL Developers Subject: Re: PSA: we lack TAP test coverage on NetBSD and OpenBSD In-reply-to: References: <9427.1547701450@sss.pgh.pa.us> <21538.1547770868@sss.pgh.pa.us> <4615.1547792324@sss.pgh.pa.us> <29225.1547834182@sss.pgh.pa.us> <7879.1548015981@sss.pgh.pa.us> <6661.1548171989@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Tue, 22 Jan 2019 17:19:11 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <11100.1548177149.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 22 Jan 2019 12:12:29 -0500 Message-ID: <11101.1548177149@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: >> I'm not following this argument. The test case is basically useless >> for its intended purpose with that parameter, because it's highly >> likely that the failure mode it's supposedly checking for will be >> masked by the "random" function's tendency to spit out the same >> value all the time. > The first value is taken about 75% of the time for N=1000 and s=2.5, which > means that a non deterministic implementation would succeed about 0.75² ~ > 56% of the time on that one. Right, that's about what we've been seeing on OpenBSD. > Also, the drawing procedure is less efficient when the parameter is close > to 1 because it is more likely to loop, That might be something to fix, but I agree it's a reason not to go overboard trying to flatten the test case's distribution right now. > If you want something more drastic, using 1.5 instead of 2.5 would reduce > the probability of accidentaly passing the test by chance to about 20%, so > it would fail 80% of the time. I think your math is off; 1.5 works quite well here. I saw one failure to produce distinct values in 20 attempts. It's not demonstrably slower than 2.5 either. (1.1 is measurably slower; probably not by enough for anyone to care, but 1.5 is good enough for me.) regards, tom lane