Running "make test" fails in master

Hello everyone,
I am new to Julia and have been trying to build it from source. I ran the make command and built it. After that I ran julia and the shell was launched. But when I ran make test it fails. Am I doing something wrong? The version I built is Version 1.7.0-DEV.737.
I get the following output:

Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:944
  Expression: LibGit2.name(brref) == "refs/heads/master"
   Evaluated: "refs/heads/main" == "refs/heads/master"
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:945
  Expression: LibGit2.shortname(brref) == master_branch
   Evaluated: "main" == "master"
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:952
  Expression: show_strs[2] == "Branch with name refs/heads/master"
   Evaluated: "Branch with name refs/heads/main" == "Branch with name refs/heads/master"
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:955
  Expression: brnch == master_branch
   Evaluated: "main" == "master"
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:956
  Expression: LibGit2.headname(repo) == master_branch
   Evaluated: "main" == "master"
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:977
  Expression: master_branch in branches
   Evaluated: "master" in ["main", "test_branch"]
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1036
  Expression: refs == ["refs/heads/master", "refs/heads/test_branch", "refs/tags/tag1", "refs/tags/tag2"]
   Evaluated: ["refs/heads/main", "refs/heads/test_branch", "refs/tags/tag1", "refs/tags/tag2"] == ["refs/heads/master", "refs/heads/test_branch", "refs/tags/tag1", "refs/tags/tag2"]
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1336
  Expression: !(LibGit2.merge!(repo, [upst_ann], true))
   Evaluated: Test.LogRecord[]
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1338
  Expression: LibGit2.merge!(repo, [upst_ann], false)
   Evaluated: Test.LogRecord[]
Error in testset LibGit2/libgit2:
Error During Test at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1387
  Got exception outside of a @test
  GitError(Code:ENOTFOUND, Class:Reference, revspec 'master' not found)
  Stacktrace:
    [1] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/error.jl:110 [inlined]
    [2] LibGit2.GitObject(repo::LibGit2.GitRepo, spec::String)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/repository.jl:142
    [3] LibGit2.GitAnnotated(repo::LibGit2.GitRepo, committish::String)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/merge.jl:44
    [4] (::LibGit2.var"#148#149"{LibGit2.GitRepo, String, String})(head_ref::LibGit2.GitReference)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/LibGit2.jl:827
    [5] with(f::LibGit2.var"#148#149"{LibGit2.GitRepo, String, String}, obj::LibGit2.GitReference)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/types.jl:1150
    [6] rebase! (repeats 2 times)
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/LibGit2.jl:813 [inlined]
    [7] (::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#65#185"{String, String, String, String, String})(repo::LibGit2.GitRepo)
      @ Main.Test70Main_LibGit2_libgit2.LibGit2Tests ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1424
    [8] with(f::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#65#185"{String, String, String, String, String}, obj::LibGit2.GitRepo)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/types.jl:1150
    [9] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1388 [inlined]
   [10] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
   [11] (::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#23#140")(dir::String)
      @ Main.Test70Main_LibGit2_libgit2.LibGit2Tests ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1388
   [12] mktempdir(fn::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#23#140", parent::String; prefix::String)
      @ Base.Filesystem ./file.jl:740
   [13] mktempdir(fn::Function, parent::String) (repeats 2 times)
      @ Base.Filesystem ./file.jl:738
   [14] top-level scope
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:605
   [15] include
      @ ./Base.jl:387 [inlined]
   [16] macro expansion
      @ ~/Clones/julia/test/testdefs.jl:24 [inlined]
   [17] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
   [18] macro expansion
      @ ~/Clones/julia/test/testdefs.jl:23 [inlined]
   [19] macro expansion
      @ ./timing.jl:368 [inlined]
   [20] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main ~/Clones/julia/test/testdefs.jl:21
   [21] (::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed ~/Clones/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:278
   [22] run_work_thunk(thunk::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed ~/Clones/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63
   [23] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:278 [inlined]
   [24] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed ./task.jl:406
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1459
  Expression: read(joinpath(test_repo, test_file), String) == read(joinpath(cache_repo, test_file), String)
   Evaluated: "j3rjc1F84N\nj3rjc1F84N\n" == "j3rjc1F84N\nj3rjc1F84N\nH9wJz39RF2\nzzzz\n"
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1471
  Expression: master_branch in branches
   Evaluated: "master" in ["main", "test_branch"]
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1505
  Expression: cache_oids[i] == test_oids[i]
   Evaluated: "0b5e01d033bcff434c59aaa32b07fb7f4fbd814f" == "b8ccad62c572272a716e89b9c47353c9bf964c6b"
Error in testset LibGit2/libgit2:
Error During Test at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1641
  Got exception outside of a @test
  GitError(Code:ENOTFOUND, Class:Reference, revspec 'master' not found)
  Stacktrace:
    [1] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/error.jl:110 [inlined]
    [2] LibGit2.GitObject(repo::LibGit2.GitRepo, spec::String)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/repository.jl:142
    [3] LibGit2.GitAnnotated(repo::LibGit2.GitRepo, committish::String)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/merge.jl:44
    [4] (::LibGit2.var"#148#149"{LibGit2.GitRepo, String, String})(head_ref::LibGit2.GitReference)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/LibGit2.jl:829
    [5] with(f::LibGit2.var"#148#149"{LibGit2.GitRepo, String, String}, obj::LibGit2.GitReference)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/types.jl:1150
    [6] rebase!
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/LibGit2.jl:813 [inlined]
    [7] (::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#87#207"{Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#add_and_commit_file#176"})(repo::LibGit2.GitRepo)
      @ Main.Test70Main_LibGit2_libgit2.LibGit2Tests ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1669
    [8] with(f::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#87#207"{Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#add_and_commit_file#176"}, obj::LibGit2.GitRepo)
      @ LibGit2 ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/src/types.jl:1150
    [9] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1642 [inlined]
   [10] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
   [11] (::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#23#140")(dir::String)
      @ Main.Test70Main_LibGit2_libgit2.LibGit2Tests ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1642
   [12] mktempdir(fn::Main.Test70Main_LibGit2_libgit2.LibGit2Tests.var"#23#140", parent::String; prefix::String)
      @ Base.Filesystem ./file.jl:740
   [13] mktempdir(fn::Function, parent::String) (repeats 2 times)
      @ Base.Filesystem ./file.jl:738
   [14] top-level scope
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:605
   [15] include
      @ ./Base.jl:387 [inlined]
   [16] macro expansion
      @ ~/Clones/julia/test/testdefs.jl:24 [inlined]
   [17] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
   [18] macro expansion
      @ ~/Clones/julia/test/testdefs.jl:23 [inlined]
   [19] macro expansion
      @ ./timing.jl:368 [inlined]
   [20] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main ~/Clones/julia/test/testdefs.jl:21
   [21] (::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed ~/Clones/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:278
   [22] run_work_thunk(thunk::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed ~/Clones/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63
   [23] macro expansion
      @ ~/Clones/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:278 [inlined]
   [24] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed ./task.jl:406
Error in testset LibGit2/libgit2:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:1737
  Expression: LibGit2.headname(repo) == master_branch
   Evaluated: "main" == "master"
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:88
  Expression: v[3] == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to $(real_threads)."
   Evaluated: "WARNING: failed to select UTF-8 encoding, using ASCII\nWARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12." == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12."
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:88
  Expression: v[3] == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to $(real_threads)."
   Evaluated: "WARNING: failed to select UTF-8 encoding, using ASCII\nWARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12." == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12."
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:88
  Expression: v[3] == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to $(real_threads)."
   Evaluated: "WARNING: failed to select UTF-8 encoding, using ASCII\nWARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12." == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12."
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:88
  Expression: v[3] == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to $(real_threads)."
   Evaluated: "WARNING: failed to select UTF-8 encoding, using ASCII\nWARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12." == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12."
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:88
  Expression: v[3] == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to $(real_threads)."
   Evaluated: "WARNING: failed to select UTF-8 encoding, using ASCII\nWARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12." == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12."
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:88
  Expression: v[3] == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to $(real_threads)."
   Evaluated: "WARNING: failed to select UTF-8 encoding, using ASCII\nWARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12." == "WARNING: couldn't parse `JULIA_CPU_THREADS` environment variable. Defaulting Sys.CPU_THREADS to 12."
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:94
  Expression: isempty(v[3])
   Evaluated: isempty("WARNING: failed to select UTF-8 encoding, using ASCII")
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:94
  Expression: isempty(v[3])
   Evaluated: isempty("WARNING: failed to select UTF-8 encoding, using ASCII")
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:94
  Expression: isempty(v[3])
   Evaluated: isempty("WARNING: failed to select UTF-8 encoding, using ASCII")
Error in testset cmdlineargs:
Test Failed at /home/ayushd/Clones/julia/test/cmdlineargs.jl:94
  Expression: isempty(v[3])
   Evaluated: isempty("WARNING: failed to select UTF-8 encoding, using ASCII")
Error in testset Downloads:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:224
  Expression: startswith(err.message, "Could not resolve host")
   Evaluated: startswith("ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer", "Could not resolve host")
Error in testset Downloads:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:225
  Expression: err.response.proto === nothing
   Evaluated: "https" === nothing
Error in testset Downloads:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:230
  Expression: startswith(err.message, "Could not resolve host")
   Evaluated: startswith("ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer", "Could not resolve host")
Error in testset Downloads:
Test Failed at /home/ayushd/Clones/julia/usr/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:231
  Expression: err.response.proto === nothing
   Evaluated: "https" === nothing
ERROR: LoadError: Test run finished with errors
in expression starting at /home/ayushd/Clones/julia/test/runtests.jl:93
make[1]: *** [Makefile:25: all] Error 1
make: *** [Makefile:526: test] Error 2

No. I also see some failed tests when running make test (just tried).

1 Like

Does it mean these were expected failures? Since the test summary said FAILURE. I built v1.5.4 as well to compare in which the test summary said SUCCESS. So it means that v.1.6 upon it’s release will have these fails resolved and is incomplete at this point?

I’m not familiar with Julia test suite, but as far as I can see what it’s doing it to clone Example.jl and check that the default branch is called master. But in your system it appears to be called main.

1 Like

Thank you for pointing that out. I changed my init.defaultBranch global git config variable from main to master. Now the libgit2 test does not fail. Can there be any other way to do this since I don’t want to change my global git variable?

Probably if you figure out how libgit2 accesses that config and how to programmatically query it

2 Likes

Okay I will try to do that. Thank you.

For the record, there is now a ticket on GitHub tracking this issue:

2 Likes

Be aware that the current master branch you are using has version 1.7.0-DEV.737. It means that is has new commits that version 1.6 will not have. Also I think it is in general somewhat expected to see things failing in master.