disarchive: Test "[prop] Writing is reversible" fails

  • Open
  • quality assurance status badge
Details
2 participants
  • Maxime Devos
  • Timothy Sample
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 4 Sep 2022 10:11
(name . bug-guix)(address . bug-guix@gnu.org)
0a60e3de-9f73-28e5-1adb-af13bfc6a870@student.kuleuven.be
X-Debbugs-CC: Timothy Sample <samplet@ngyro.com>

Hi,

disarchive fails to build (on core-updates, more precisely as part of
the antiox jobset on ci.guix.gnu.org).

The failing test is:

Toggle quote (20 lines)
> test-name: [prop] Writing is reversible
> location: tests/kinds/octal.scm:128
> source:
> + (test-assert
> +   "[prop] Writing is reversible"
> +   (quickcheck
> +     (property
> +       ((octal $octal))
> +       (test-when
> +         (valid-octal? octal)
> +         (begin
> +           (equal?
> +             octal
> +             (decode-octal (encode-octal octal))))))))
> Falsifiable after 25 tests.
> Seed: 318171092
> octal = #<<unstructured-octal> value: 0 source: #<<zero-string> value:
> "0" trailer: "?">>
> actual-value: #f
> result: FAIL
(This appears to be a different test failure than in

TBI ...

Greetings,
Maxime.
M
M
Maxime Devos wrote on 4 Sep 2022 10:24
(address . 57573@debbugs.gnu.org)(name . timothy sample)(address . samplet@ngyro.com)
7c6a2480-072e-e88a-08d7-e22c22cfaf6d@student.kuleuven.be
Here's a reproducer:

(define o (make-unstructured-octal 0 (make-zero-string "0" #\?)))
(test-equal "Writing is reversible (#57573)"
        o (decode-octal (encode-octal octal)))
M
M
Maxime Devos wrote on 4 Sep 2022 11:05
(address . 57573@debbugs.gnu.org)(name . timothy sample)(address . samplet@ngyro.com)
6a051c77-21f9-c597-7225-727020dccb25@student.kuleuven.be
On 04-09-2022 10:24, Maxime Devos wrote:
Toggle quote (6 lines)
> Here's a reproducer:
>
> (define o (make-unstructured-octal 0 (make-zero-string "0" #\?)))
> (test-equal "Writing is reversible (#57573)"
>         o (decode-octal (encode-octal octal)))
>
That was bogus (octal is undefined), try

Toggle quote (5 lines)
>
> (define o (make-unstructured-octal 0 (make-zero-string "0" "?")))
> (unless (valid-octal? o) (error "oops"))
> (test-equal "Writing is reversible (#57573)"
>         o (decode-octal (encode-octal o)))
instead. Error message:
Toggle quote (12 lines)
> test-name: Writing is reversible (#57573)
> location: tests/kinds/octal.scm:130
> source:
> + (test-equal
> +   "Writing is reversible (#57573)"
> +   o
> +   (decode-octal (encode-octal o)))
> expected-value: #<<unstructured-octal> value: 0 source:
> #<<zero-string> value: "0" trailer: "?">>
> actual-value: #<<padded-octal> value: 0 width: 1 padding: #\0 trailer:
> "?">
> result: FAIL
Greetings,
Maxime.
T
T
Timothy Sample wrote on 8 Sep 2022 20:21
(name . Maxime Devos)(address . maxime.devos@student.kuleuven.be)(address . 57573@debbugs.gnu.org)
871qsllob8.fsf@ngyro.com
Hi Maxime,

Maxime Devos <maxime.devos@student.kuleuven.be> writes:

Toggle quote (5 lines)
> (define o (make-unstructured-octal 0 (make-zero-string "0" "?")))
> (unless (valid-octal? o) (error "oops"))
> (test-equal "Writing is reversible (#57573)"
>         o (decode-octal (encode-octal o)))

Right. That unstructured octal should be invalid. By the definition in
the code, it has too much “structure”. It’s a test issue, the actual
code is fine. I’ll patch the tests and make a point release in the
coming days.

Thanks for the heads up and the analysis, and sorry for the
inconvenience!


-- Tim

P.S. I’m excited about antioxidant – good work and happy hacking!
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 57573@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57573
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch