aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/julia/fix-or-disable-broken-tests.patch
blob: 51d53110445971d112ca887450767cd2b620a17d (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
@@ -439,7 +439,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
@@ -6,7 +6,7 @@
 
 TESTGROUPS = linalg sparse unicode strings dates
 TESTS = all $(TESTGROUPS) \
-		$(filter-out TestHelpers runtests testdefs, \
+		$(filter-out TestHelpers runtests testdefs libdl, \
 			$(patsubst $(SRCDIR)/%.jl,%,$(wildcard $(SRCDIR)/*.jl))) \
 		$(foreach group,$(TESTGROUPS), \
 			$(patsubst $(SRCDIR)/%.jl,%,$(wildcard $(SRCDIR)/$(group)/*.jl)))
--- a/test/cmdlineargs.jl
+++ b/test/cmdlineargs.jl
@@ -404,7 +404,7 @@
     bt = readstring(pipeline(ignorestatus(`$(Base.julia_cmd()) --startup-file=no --precompiled=$precomp
         -E 'include("____nonexistent_file")'`), stderr=catcmd))
     @test contains(bt, "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, "include_from_node1(::String) at $(joinpath(".","loading.jl"))")
     else
--- a/test/choosetests.jl
+++ b/test/choosetests.jl
@@ -32,7 +32,7 @@
         "replutil", "sets", "test", "goto", "llvmcall", "llvmcall2", "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", "distributed", "inline",
         "boundscheck", "error", "ambiguous", "cartesian", "asmvariant", "osutils",
         "channels", "iostream", "specificity"
--- 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
@@ -466,8 +466,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