From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 15:50:02 2021 Received: (at 48114) by debbugs.gnu.org; 30 Apr 2021 19:50:03 +0000 Received: from localhost ([127.0.0.1]:59875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcZ9G-0000Xj-6Q for submit@debbugs.gnu.org; Fri, 30 Apr 2021 15:50:02 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcZ9D-0000XK-Nb for 48114@debbugs.gnu.org; Fri, 30 Apr 2021 15:50:00 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4D14D5C00B5; Fri, 30 Apr 2021 15:49:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 30 Apr 2021 15:49:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Vb20ZdhziWEIpLGYCsBqFNgF1gXqzRnV3N0+ifg4q Do=; b=f+lIXdTub/gI5YjCxmszmAgjlveFTHY+lRtd5Zl0Q3Ke1D05GHOSSbPMu e+loDLc+DFzGPRdO50s5uPNI8uF5CsEnbRbBltrkF6JRpqVtEpe4fno+kg2LPW1w +x8/8PfbuCTQuhBBYECjewe609HqLLMlN8n3MaAnMlPT9YAqwLU/D6CfWf7OLVXc FEsdTXluA7OvgcBpDy06P/jjJJFE1TSk+BMbMiaiK/Swky7kJO/cmawXR9TIG+qn MWGplOxplncou5FuVbZ9w+wqIr9ivnPpruFGKkKqTX1WBpAbkry/myeHYW10FssI v/bkRMm0sF8rHil26ua6Tf8Yu17/A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddviedgudegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufhffjgfkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefvihhm ohhthhihucfurghmphhlvgcuoehsrghmphhlvghtsehnghihrhhordgtohhmqeenucggtf frrghtthgvrhhnpeeiudeuhfeggeelleevheegudfguefhieekffdtveeilefglefhvddt gfeiheetgfenucfkphepjeegrdduudeirddukeeirdeggeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmphhlvghtsehnghihrhhordgt ohhm X-ME-Proxy: Received: from mrblack (74-116-186-44.qc.dsl.ebox.net [74.116.186.44]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Apr 2021 15:49:53 -0400 (EDT) From: Timothy Sample To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#48114: Disarchive occasionally fails tests References: <87v984gkhn.fsf@inria.fr> Date: Fri, 30 Apr 2021 15:49:52 -0400 In-Reply-To: <87v984gkhn.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Fri, 30 Apr 2021 12:00:36 +0200") Message-ID: <87pmybeen3.fsf@ngyro.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48114 Cc: 48114@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hey, Ludovic Court=C3=A8s writes: > Disarchive 0.2.0 occasionally fails two tests: > > FAIL: tests/kinds/octal.scm - [prop] Writing is reversible > FAIL: tests/kinds/octal.scm - [prop] Serializing is reversible These two tests have a bit of a problem. They occasionally fail by =E2=80=9Cgiving up=E2=80=9D, which is when too many test cases are discarde= d rather than used. (This happens because you might write a generator for a superset of the values you=E2=80=99re interested in, and then filter out some values= with =E2=80=9Ctest-when=E2=80=9D.) I don=E2=80=99t think this is happening here= , though. You would see something like =E2=80=9CGave up! Passed only 0 ests [sic].=E2=80=9D > I added =E2=80=98pk=E2=80=99 calls like so: > > (test-assert "[prop] Writing is reversible" > (quickcheck > (property ((octal $octal)) > (test-when (valid-octal? octal) > (begin > (equal? (pk 'oct octal) (pk 'decode (decode-octal (encode-octal = octal))))))))) > > (test-assert "[prop] Serializing is reversible" > (quickcheck > (property ((octal $octal)) > (test-when (valid-octal? octal) > (equal? (pk 'OCT octal) (pk 'DECODE (serdeser -octal- octal))))))) > > > and got this output: > > ;;; (oct #< value: 0 source: #< value: "= \U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" trailer: = #vu8(172 156 23 48 25 29 159 226 210)>>) > > ;;; (decode #< value: 0 source: #< value= : "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" traile= r: #vu8(172 156 23 48 25 29 159 226 210)>>) > actual-value: #f > actual-error: > + (out-of-range > + #f > + "Value out of range ~S to ~S: ~S" > + (8 9 10) > + (10)) > result: FAIL > > [=E2=80=A6] > > ;;; (OCT #< value: 0 source: #< value: "= \U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" trailer: = #vu8(172 156 23 48 25 29 159 226 210)>>) > > ;;; (DECODE #< value: 0 source: #< value= : "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" traile= r: #vu8(172 156 23 48 25 29 159 226 210)>>) > actual-value: #f > actual-error: > + (out-of-range > + #f > + "Value out of range ~S to ~S: ~S" > + (8 9 10) > + (10)) > result: FAIL > > I=E2=80=99m not sure where the exception comes from though. I can=E2=80=99t seem to reproduce this. I=E2=80=99ve run the test suite ma= ny, many times, but I also tried: ,use (disarchive kinds octal) ,use (disarchive kinds zero-string) ,use (disarchive serialization) (define the-zero-string (make-zero-string "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" #vu8(172 156 23 48 25 29 159 226 210))) (define the-octal (make-unstructured-octal 0 the-zero-string)) (equal? the-octal (decode-octal (encode-octal the-octal))) (equal? the-octal (serdeser -octal- the-octal)) Which works fine. (Does it work for you?) However, isn=E2=80=99t it possible that these values aren=E2=80=99t the cul= prits? With the =E2=80=9Cpk=E2=80=9D calls you added, isn=E2=80=99t it printing the las= t OK value without telling us the value causing the issue? What if you run it with the following? (test-assert "[prop] Writing is reversible" (quickcheck (property ((octal $octal)) (test-when (valid-octal? octal) (false-if-exception ; <-- changed! (equal? octal (decode-octal (encode-octal octal)))))))) This way, Guile-QuickCheck should print the offending value and the seed used for the tests, which could be helpful for reproducing. (The fact that it doesn=E2=80=99t handle exceptions well is a known bug!) -- Tim