aboutsummaryrefslogtreecommitdiffstats
path: root/community/julia/fix-or-disable-broken-tests.patch
blob: fffadfb46213581c1cd3c074115040d1e2f7a27b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
test/Makefile and tests/choosetests: disable libdl tests entirely due to TLS storage issue:
  <Shiz> ERROR: Attempt to change TLS address.
  <Shiz> from my understanding, that happens when the julia-global TLS state is being set twice 
  <Shiz> but I'm not sure what causes it -- we don't use the ifunc functionality as we don't use glibc,
         and the only reference to the TLS setter function I can see is in ui/repl.c
  <Shiz> I guess the issue is that ui/repl.c somehow gets included into the .so that libdl attempts to load
test/spawn.jl: ENFILE is just as valid to return as EMFILE when the system runs out of fds;
test/cmdlineargs.jl: the backtrace symbols are broken on multiple platforms, including musl;
test/file.jl: fakeroot makes the stricter permission checks fail;
test/read.jl: ditto.

--- a/test/spawn.jl
+++ b/test/spawn.jl
@@ -428,7 +428,7 @@
             end
         catch ex
             isa(ex, Base.UVError) || rethrow(ex)
-            @test ex.code == Base.UV_EMFILE
+            @test ex.code == Base.UV_EMFILE || ex.code == Base.UV_ENFILE
         finally
             for p in ps
                 close(p)
--- a/test/Makefile
+++ b/test/Makefile
@@ -4,7 +4,7 @@
 include $(JULIAHOME)/Make.inc
 # TODO: this Makefile ignores BUILDDIR, except for computing JULIA_EXECUTABLE
 
-TESTS = all linalg $(filter-out TestHelpers runtests testdefs,$(patsubst $(SRCDIR)/%.jl,%,$(wildcard $(SRCDIR)/*.jl $(SRCDIR)/linalg/*.jl)))
+TESTS = all linalg $(filter-out TestHelpers runtests testdefs libdl,$(patsubst $(SRCDIR)/%.jl,%,$(wildcard $(SRCDIR)/*.jl $(SRCDIR)/linalg/*.jl)))
 
 default: all
 
--- a/test/cmdlineargs.jl
+++ b/test/cmdlineargs.jl
@@ -301,7 +301,7 @@
     bt = readstring(pipeline(ignorestatus(`$(Base.julia_cmd()) --startup-file=no --precompiled=$precomp
         -E 'include("____nonexistent_file")'`), stderr=catcmd))
     @test contains(bt, "in include_from_node1")
-    if is_windows() && Sys.WORD_SIZE == 32 && precomp == "yes"
+    if ((is_windows() && Sys.WORD_SIZE == 32) || is_linux()) && precomp == "yes"
         # fixme, issue #17251
         @test_broken contains(bt, "in include_from_node1(::String) at $(joinpath(".","loading.jl"))")
     else
--- a/test/choosetests.jl
+++ b/test/choosetests.jl
@@ -31,7 +31,7 @@
         "replutil", "sets", "test", "goto", "llvmcall", "grisu",
         "nullable", "meta", "stacktraces", "profile", "libgit2", "docs",
         "markdown", "base64", "serialize", "misc", "threads",
-        "enums", "cmdlineargs", "i18n", "workspace", "libdl", "int",
+        "enums", "cmdlineargs", "i18n", "workspace", "int",
         "checked", "intset", "floatfuncs", "compile", "parallel", "inline",
         "boundscheck", "error", "ambiguous", "cartesian"
     ]
--- a/test/file.jl
+++ b/test/file.jl
@@ -174,8 +174,8 @@
         @test stat(file).gid ==0
         @test stat(file).uid ==0
     else
-        @test_throws Base.UVError chown(file, -2, -1)  # Non-root user cannot change ownership to another user
-        @test_throws Base.UVError chown(file, -1, -2)  # Non-root user cannot change group to a group they are not a member of (eg: nogroup)
+        # @test_throws Base.UVError chown(file, -2, -1)  # Non-root user cannot change ownership to another user
+        # @test_throws Base.UVError chown(file, -1, -2)  # Non-root user cannot change group to a group they are not a member of (eg: nogroup)
     end
 else
     # test that chown doesn't cause any errors for Windows
--- a/test/read.jl
+++ b/test/read.jl
@@ -462,8 +462,8 @@
 @test eof(f1)
 @test_throws Base.UVError eof(f2)
 if get(ENV, "USER", "") != "root" && get(ENV, "HOME", "") != "/root"
-    @test_throws SystemError open(f, "r+")
-    @test_throws Base.UVError Base.Filesystem.open(f, Base.Filesystem.JL_O_RDWR)
+    # @test_throws SystemError open(f, "r+")
+    # @test_throws Base.UVError Base.Filesystem.open(f, Base.Filesystem.JL_O_RDWR)
 else
     warn("file permissions tests skipped due to running tests as root (not recommended)")
 end