Subject: bug#48114: closed (Re: bug#48114: Disarchive occasionally fails tests)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 14 May 2021 03:07:02 +0000

Your bug report

#48114: Disarchive occasionally fails tests

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
48114: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48114
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#48114: Disarchive occasionally fails tests
From: Timothy Sample <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Thu, 13 May 2021 23:06:07 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Heyo,

Ludovic Courtès <[email-masked]> writes:

> Timothy Sample <[email-masked]> skribis:
>
>> In Disarchive, I can rewrite the generator without regex.  I’ll do that
>> and see what I can do about the “Gave up!” issue.
>
> Did you have a chance to look into it?

I just pushed b9f0e78238e6186d28d738c7c5355a56557ce84f, which updates
Disarchive to 0.2.1, which has fixes for the test suite.  The giving up
problem has not been solved outright, but it should be practically
impossible to trigger.  (In fact, it probably *is* impossible to trigger
given how few PRNG states there are....)

> I’d like to make ‘guix’ and ‘guix-daemon’ depend on Disarchive, but not
> before we can be sure its test suite passes.

Exciting!

-- Tim

Subject: Disarchive occasionally fails tests
From: Ludovic Courtès <[email-masked]>
To: <[email-masked]>
Date: Fri, 30 Apr 2021 12:00:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Timothy,

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

(Thanks, Quickcheck! :-))

I added ‘pk’ calls like so:

--8<---------------cut here---------------start------------->8---
(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)))))))
--8<---------------cut here---------------end--------------->8---

and got this output:

--8<---------------cut here---------------start------------->8---
;;; (oct #<<unstructured-octal> value: 0 source: #<<zero-string> value: "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" trailer: #vu8(172 156 23 48 25 29 159 226 210)>>)

;;; (decode #<<unstructured-octal> value: 0 source: #<<zero-string> value: "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" trailer: #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

[…]

;;; (OCT #<<unstructured-octal> value: 0 source: #<<zero-string> value: "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" trailer: #vu8(172 156 23 48 25 29 159 226 210)>>)

;;; (DECODE #<<unstructured-octal> value: 0 source: #<<zero-string> value: "\U0f94a4\u0912\U025627\U10e96a\u9576\u2077\u048f\U0f2f60\U0f744b" trailer: #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
--8<---------------cut here---------------end--------------->8---

I’m not sure where the exception comes from though.

Thoughts?

Thanks,
Ludo’.