From 7a8ff30b55576082bff0dc3a8ea33085826d6f6c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sat, 15 Feb 2020 16:13:49 +0000 Subject: [PATCH] Add reproduction case for #3143 Signed-off-by: Rudi Grinberg --- test/blackbox-tests/dune.inc | 22 +++++++--- .../external-lib-deps/github3143/run.t | 41 +++++++++++++++++++ .../external-lib-deps/{ => simple}/dune | 0 .../{ => simple}/dune-project | 0 .../external-lib-deps/{ => simple}/run.t | 0 5 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 test/blackbox-tests/test-cases/external-lib-deps/github3143/run.t rename test/blackbox-tests/test-cases/external-lib-deps/{ => simple}/dune (100%) rename test/blackbox-tests/test-cases/external-lib-deps/{ => simple}/dune-project (100%) rename test/blackbox-tests/test-cases/external-lib-deps/{ => simple}/run.t (100%) diff --git a/test/blackbox-tests/dune.inc b/test/blackbox-tests/dune.inc index 6f7b3602ef7..7c577546c0c 100644 --- a/test/blackbox-tests/dune.inc +++ b/test/blackbox-tests/dune.inc @@ -774,11 +774,21 @@ (diff? run.t run.t.corrected))))) (rule - (alias external-lib-deps) - (deps (package dune) (source_tree test-cases/external-lib-deps)) + (alias external-lib-deps-github3143) + (deps (package dune) (source_tree test-cases/external-lib-deps/github3143)) (action (chdir - test-cases/external-lib-deps + test-cases/external-lib-deps/github3143 + (progn + (run %{exe:cram.exe} run.t -sanitizer %{bin:sanitizer}) + (diff? run.t run.t.corrected))))) + +(rule + (alias external-lib-deps-simple) + (deps (package dune) (source_tree test-cases/external-lib-deps/simple)) + (action + (chdir + test-cases/external-lib-deps/simple (progn (run %{exe:cram.exe} run.t -sanitizer %{bin:sanitizer}) (diff? run.t run.t.corrected))))) @@ -2722,7 +2732,8 @@ (alias exec-cmd) (alias exec-missing) (alias exes-with-c) - (alias external-lib-deps) + (alias external-lib-deps-github3143) + (alias external-lib-deps-simple) (alias extra-lang-line) (alias fallback-dune) (alias findlib) @@ -2977,7 +2988,8 @@ (alias exec-cmd) (alias exec-missing) (alias exes-with-c) - (alias external-lib-deps) + (alias external-lib-deps-github3143) + (alias external-lib-deps-simple) (alias extra-lang-line) (alias fallback-dune) (alias findlib) diff --git a/test/blackbox-tests/test-cases/external-lib-deps/github3143/run.t b/test/blackbox-tests/test-cases/external-lib-deps/github3143/run.t new file mode 100644 index 00000000000..1d16c0ff803 --- /dev/null +++ b/test/blackbox-tests/test-cases/external-lib-deps/github3143/run.t @@ -0,0 +1,41 @@ +Reproduce #3143 + + $ echo "(lang dune 2.3)" > dune-project + $ touch dummypkg.opam + $ cat >dune < (library + > (public_name dummypkg) + > (libraries base doesnotexist.foo)) + > EOF + $ dune external-lib-deps @install + Internal error, please report upstream including the contents of _build/log. + Description: + ("Map.find_exn: failed to find key", + { key = "doesnotexist.foo"; keys = [ "doesnotexist" ] }) + Backtrace: + Raised at file "src/stdune/code_error.ml", line 9, characters 30-62 + Called from file "src/dune/findlib/findlib.ml", line 498, characters 8-44 + Called from file "src/dune/lib.ml", line 1843, characters 24-59 + Called from file "src/dune/lib.ml", line 1189, characters 10-25 + Called from file "src/dune/lib.ml", line 1203, characters 21-49 + Called from file "src/dune/lib.ml", line 1203, characters 21-49 + Called from file "src/dune/lib.ml", line 1181, characters 10-38 + Called from file "src/dune/lib.ml", line 1287, characters 25-76 + Called from file "list.ml", line 121, characters 24-34 + Called from file "src/dune/lib.ml", line 1269, characters 6-1023 + Called from file "src/dune/lib.ml" (inlined), line 1110, characters 9-75 + Called from file "src/dune/lib.ml", line 1109, characters 6-104 + Called from file "src/dune/lib.ml", line 1192, characters 12-42 + Called from file "src/dune/lib.ml", line 1851, characters 10-61 + Called from file "src/dune/super_context.ml", line 529, characters 18-56 + Called from file "src/dune/dir_with_dune.ml", line 23, characters 55-67 + Called from file "src/dune/super_context.ml", line 526, characters 6-692 + Called from file "src/dune/gen_rules.ml", line 412, characters 6-102 + Called from file "src/fiber/fiber.ml", line 102, characters 8-15 + + I must not segfault. Uncertainty is the mind-killer. Exceptions are + the little-death that brings total obliteration. I will fully express + my cases. Execution will pass over me and through me. And when it + has gone past, I will unwind the stack along its path. Where the + cases are handled there will be nothing. Only I will remain. + [1] diff --git a/test/blackbox-tests/test-cases/external-lib-deps/dune b/test/blackbox-tests/test-cases/external-lib-deps/simple/dune similarity index 100% rename from test/blackbox-tests/test-cases/external-lib-deps/dune rename to test/blackbox-tests/test-cases/external-lib-deps/simple/dune diff --git a/test/blackbox-tests/test-cases/external-lib-deps/dune-project b/test/blackbox-tests/test-cases/external-lib-deps/simple/dune-project similarity index 100% rename from test/blackbox-tests/test-cases/external-lib-deps/dune-project rename to test/blackbox-tests/test-cases/external-lib-deps/simple/dune-project diff --git a/test/blackbox-tests/test-cases/external-lib-deps/run.t b/test/blackbox-tests/test-cases/external-lib-deps/simple/run.t similarity index 100% rename from test/blackbox-tests/test-cases/external-lib-deps/run.t rename to test/blackbox-tests/test-cases/external-lib-deps/simple/run.t