Message ID | 20230412160010.3232633-1-zimon.toutoune@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bug#62796,core-updates] gnu: ocaml-ppxlib: Fix tests. | expand |
Hi,
On mer., 12 avril 2023 at 18:00, Simon Tournier <zimon.toutoune@gmail.com> wrote:
> This fixes a regression when updating grep.
The other affected package is ocaml-mdx, fixed by [PATCH v2] send to
patch#62796.
Considering these 2 patches, the OCaml packages in core-updates build
fine. Except ocaml-uring with the error:
--8<---------------cut here---------------start------------->8---
# let `Timeout, timeout = consume t;;
-val timeout : int = -62
+val timeout : int = -22
--8<---------------cut here---------------end--------------->8---
Well, the errno -62 is expected and corresponds to -ETIME from Linux
kernel documentation. All documented in tests/main.md of the package
ocaml-uring,
--8<---------------cut here---------------start------------->8---
## Timeout
Timeout should return (-ETIME). This is defined in https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/errno.h#L45
```ocaml
[...]
# let `Timeout, timeout = consume t;;
val timeout : int = -62
--8<---------------cut here---------------end--------------->8---
And I do not understand why this -22 (EINVAL Invalid argument). Any
idea?
Cheers,
simon
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index c6dca2874f..f1c4e35044 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -6660,7 +6660,12 @@ (define-public ocaml-ppxlib (substitute* "test/ppx_import_support/test.ml" (("\\(Failure") "Failure") ((" \"(Some ppx-es.*)\")" _ m) - (string-append " \"" m "\".")))))))) + (string-append " \"" m "\"."))))) + (add-after 'fix-test-format 'fix-egrep + (lambda _ + ;; egrep is obsolescent; using grep -E + (substitute* "test/expansion_context/run.t" + (("egrep") "grep -E"))))))) (propagated-inputs (list ocaml-compiler-libs ocaml-ppx-derivers