all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Timothy Sample <samplet@ngyro.com>
Cc: 48114@debbugs.gnu.org
Subject: bug#48114: Disarchive occasionally fails tests
Date: Sun, 02 May 2021 21:57:43 +0200	[thread overview]
Message-ID: <874kfk6h8o.fsf@gnu.org> (raw)
In-Reply-To: <87pmybeen3.fsf@ngyro.com> (Timothy Sample's message of "Fri, 30 Apr 2021 15:49:52 -0400")

Hello!

Timothy Sample <samplet@ngyro.com> skribis:

> I can’t seem to reproduce this.  I’ve run the test suite many, many
> times, but I also tried:

I can reproduce it quickly with:

  while make check TESTS=tests/kinds/octal.scm -j5 ; do : ; done

… in C locale (LC_ALL & co. all unset).

> However, isn’t it possible that these values aren’t the culprits?  With
> the “pk” calls you added, isn’t it printing the last OK value without
> telling us the value causing the issue?

You’re right, the values printed are not the culprit.  The problem comes
from the generator (I had to raise the (quickcheck …) form out of
‘test-assert’ so I could get a backtrace):

--8<---------------cut here---------------start------------->8---
Backtrace:
          13 (primitive-load "/data/src/disarchive/./build-aux/test-driver.scm")
In ice-9/eval.scm:
    619:8 12 (_ #(#(#<directory (guile-user) 7fccb09d9f00> ((() "./tests/kinds/octal.scm") (# . "no") (# . #) ?)) #))
    619:8 11 (_ #(#(#(#(#(#(#(#(#<directory (guile-user) 7fccb09d9f00> ("./tests/kinds/octal?") ?)) ?) ?) ?) ?) ?) ?))
In ice-9/boot-9.scm:
    142:2 10 (dynamic-wind _ _ #<procedure 7fccaf5b81a0 at ice-9/eval.scm:330:13 ()>)
In unknown file:
           9 (primitive-load "./tests/kinds/octal.scm")
In quickcheck.scm:
    118:6  8 (check #<<quickcheck-config> seed: 321557891 stop?: #<procedure 7fccaf8c3540 at ice-9/eval.scm:336:13?> ?)
    98:12  7 (check-results _ #<<property> names: (octal) gen/arbs: (#<<arbitrary> gen: #<<generator> proc: #<proce?>)
In quickcheck/generator.scm:
     65:2  6 (_ 7 #<<rng-state> start: #(1907167801 2749187034 1190323419 1039883844 766725436 3567744198) s1: #(29?>)
     65:2  5 (_ 7 #<<rng-state> start: #(1907167801 2749187034 1190323419 1039883844 766725436 3567744198) s1: #(29?>)
    78:17  4 (_ 7 #<<rng-state> start: #(1907167801 2749187034 1190323419 1039883844 766725436 3567744198) s1: #(28?>)
   105:22  3 (_ _)
In tests/kinds.scm:
    84:22  2 (fix-unstructured-octal-value #<<unstructured-octal> value: 7 source: #<<zero-string> value: "\U0f99aa?>)
    86:47  1 (_ _)
In unknown file:
           0 (substring "\U0f99aa?\U0ff7c1\U0fb97a\U0ff933?\U0fe7a1" 6 8)

ERROR: In procedure substring:
Value out of range 6 to 7: 8
--8<---------------cut here---------------end--------------->8---

Note that this is in C locale, which may mean that ‘regexp-exec’, which
passes strings to libc, gets offsets wrong somehow (see
‘fixup_multibyte_match’ in libguile), though I couldn’t reproduce it
with the string above.

Anyway, ‘guix build disarchive’ builds in en_US.utf8 locale, so the
thing above is probably a wrong lead.

If I switch to en_US.utf8, I occasionally get the following error
instead:

--8<---------------cut here---------------start------------->8---
test-name: [prop] Serializing is reversible
location: tests/kinds/octal.scm:154
source:
+ (test-assert
+   "[prop] Serializing is reversible"
+   (quickcheck
+     (property
+       ((octal $octal))
+       (test-when
+         (valid-octal? octal)
+         (equal?
+           (pk 'OCT octal)
+           (pk 'DECODE (serdeser -octal- octal)))))))

;;; (OCT #<<unstructured-octal> value: 0 source: #<<zero-string> value: "" trailer: "">>)

;;; (DECODE #<<unstructured-octal> value: 0 source: #<<zero-string> value: "" trailer: "">>)
Gave up! Passed only 1 est.
actual-value: #f
result: FAIL
--8<---------------cut here---------------end--------------->8---

This is more in line with what you described.  Any ideas on how to
address that?

Thanks,
Ludo’.




  reply	other threads:[~2021-05-02 19:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 10:00 bug#48114: Disarchive occasionally fails tests Ludovic Courtès
2021-04-30 19:49 ` Timothy Sample
2021-05-02 19:57   ` Ludovic Courtès [this message]
2021-05-03  2:24     ` Timothy Sample
2021-05-03  4:02       ` Timothy Sample
2021-05-03  6:19         ` Bengt Richter
2021-05-03 20:03         ` Ludovic Courtès
2021-05-13 21:04         ` Ludovic Courtès
2021-05-14  3:06           ` Timothy Sample
2021-05-14 13:51             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kfk6h8o.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48114@debbugs.gnu.org \
    --cc=samplet@ngyro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.