Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 750005

Summary: dev-lang/elixir-1.10.4 test failure Kernel.CLI.CompileTest
Product: Gentoo Linux Reporter: Alexey <alexey+gentoo>
Component: Current packagesAssignee: Mikhail S. Pobolovets <styx.mp>
Status: RESOLVED OBSOLETE    
Severity: normal CC: alexey+gentoo, proxy-maint
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=727344
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log

Description Alexey 2020-10-18 18:54:32 UTC
Created attachment 666638 [details]
emerge --info

1) test compiles code (Kernel.CLI.CompileTest)                                                                                                                                                                                                                                  
     test/elixir/kernel/cli_test.exs:120                                                                                                                                                                                                                                          
     Assertion with == failed                                                                                                                                                                                                                                                     
     code:  assert :code.which(CompileSample) |> List.to_string() == Path.expand(context[:beam_file_path])                                                                                                                                                                        
     left:  ""                                                                                                                                                                                                                                                                    
     right: "/mnt/portagetmp/portage/dev-lang/elixir-1.10.4/work/elixir-1.10.4/lib/elixir/tmp/beams/120/Elixir.CompileSample.beam"                                                                                                                                                
     stacktrace:                                                                                                                                                                                                                                                                  
       test/elixir/kernel/cli_test.exs:126: (test)
Comment 1 Alexey 2020-10-18 18:55:08 UTC
Created attachment 666641 [details]
build.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-10-27 22:24:28 UTC
Does it fail for you every time you run a test? Or happens only occasionally?

We saw it in bug #727344 as well. It's somehow very hard to reproduce. Makes it hard to debug and understand why it happens at all. My suspiction is on some (old?) epmd daemon running.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-10-27 22:53:52 UTC
My speculation is that problem happens when one test collides with another when compiles (or loads? or maybe cleans up?) CompileSample sample module.

$ git grep CompileSample | cat
lib/elixir/test/elixir/code_test.exs:    assert [{CompileSample, binary}] = Code.compile_file(fixture_path("compile_sample.ex"))
lib/elixir/test/elixir/code_test.exs:    :code.purge(CompileSample)
lib/elixir/test/elixir/code_test.exs:    :code.delete(CompileSample)
lib/elixir/test/elixir/code_test.exs:    assert [{CompileSample, binary}] = Code.require_file(fixture_path("compile_sample.ex"))
lib/elixir/test/elixir/code_test.exs:    :code.purge(CompileSample)
lib/elixir/test/elixir/code_test.exs:    :code.delete(CompileSample)
lib/elixir/test/elixir/fixtures/compile_sample.ex:defmodule(CompileSample, do: nil)
lib/elixir/test/elixir/kernel/cli_test.exs:    beam_file_path = Path.join([context.tmp_dir, "Elixir.CompileSample.beam"])
lib/elixir/test/elixir/kernel/cli_test.exs:    assert :code.which(CompileSample) |> List.to_string() == Path.expand(context.beam_file_path)
lib/elixir/test/elixir/kernel/cli_test.exs:    :code.purge(CompileSample)
lib/elixir/test/elixir/kernel/cli_test.exs:    :code.delete(CompileSample)
lib/elixir/test/elixir/kernel/cli_test.exs:    assert :code.which(CompileSample) |> List.to_string() == Path.expand(context[:beam_file_path])
lib/elixir/test/elixir/kernel/cli_test.exs:    :code.purge(CompileSample)
lib/elixir/test/elixir/kernel/cli_test.exs:    :code.delete(CompileSample)
Comment 4 Alexey 2020-10-28 00:29:40 UTC
It happened once, but not again.
Comment 5 Matthew Smith gentoo-dev 2022-03-08 20:34:05 UTC
Reliably able to run and pass tests of Elixir 1.11.4 (oldest in tree) and 1.13.3 (newest in tree) on Erlang 24.2.2.

Assuming only this old version is affected.