Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests usr.bin/make: document probabilities...



details:   https://anonhg.NetBSD.org/src/rev/b3b01187364a
branches:  trunk
changeset: 968232:b3b01187364a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Jan 07 22:42:14 2020 +0000

description:
usr.bin/make: document probabilities for random test failures

Side node: this test will never fail between 2024-04-15 and 2024-07-06.

diffstat:

 usr.bin/make/unit-tests/modorder.mk |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 043e381cb1d0 -r b3b01187364a usr.bin/make/unit-tests/modorder.mk
--- a/usr.bin/make/unit-tests/modorder.mk       Tue Jan 07 21:24:16 2020 +0000
+++ b/usr.bin/make/unit-tests/modorder.mk       Tue Jan 07 22:42:14 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: modorder.mk,v 1.1 2014/08/21 13:44:51 apb Exp $
+# $NetBSD: modorder.mk,v 1.2 2020/01/07 22:42:14 rillig Exp $
 
 LIST=          one two three four five six seven eight nine ten
 LISTX=         ${LIST:Ox}
@@ -12,8 +12,9 @@
        @echo "LIST:O    = ${LIST:O}"
        # Note that 1 in every 10! trials two independently generated
        # randomized orderings will be the same.  The test framework doesn't
-       # support checking probabilistic output, so we accept that the test
-       # will incorrectly fail with probability 2.8E-7.
+       # support checking probabilistic output, so we accept that each of the
+       # 3 :Ox tests will incorrectly fail with probability 2.756E-7, which
+       # lets the whole test fail once in 1.209.600 runs, on average.
        @echo "LIST:Ox   = `test '${LIST:Ox}' != '${LIST:Ox}' ${TEST_RESULT}`"
        @echo "LIST:O:Ox = `test '${LIST:O:Ox}' != '${LIST:O:Ox}' ${TEST_RESULT}`"
        @echo "LISTX     = `test '${LISTX}' != '${LISTX}' ${TEST_RESULT}`"



Home | Main Index | Thread Index | Old Index