diff mbox series

[bug#62796,core-updates] gnu: ocaml-ppxlib: Fix tests.

Message ID 20230412160010.3232633-1-zimon.toutoune@gmail.com
State New
Headers show
Series [bug#62796,core-updates] gnu: ocaml-ppxlib: Fix tests. | expand

Commit Message

Simon Tournier April 12, 2023, 4 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-ppxlib)[arguments]: Substitue obsolete 'egrep'
by 'grep -E'.
---
 gnu/packages/ocaml.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Hi,

This fixes a regression when updating grep.


Cheers,
simon



base-commit: a3bfb867380f1e5ce157334d7d9877297ef509ab

Comments

Simon Tournier April 12, 2023, 5:08 p.m. UTC | #1
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 mbox series

Patch

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