From 02f9e7786865e4a150e7080a7c4e1ddaea641c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C8=98erb=C4=83nescu?= Date: Tue, 6 Feb 2024 20:48:06 +0100 Subject: [PATCH 1/3] tor: disabled tests on aarch32 --- pkgs/tools/security/tor/default.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix index 5fc68c0a1c29..2e1146c5cb1e 100644 --- a/pkgs/tools/security/tor/default.nix +++ b/pkgs/tools/security/tor/default.nix @@ -77,7 +77,30 @@ stdenv.mkDerivation rec { # oom/streambuf: [forking] # FAIL src/test/test_oom.c:287: assert(x_ OP_GE 500 - 5): 0 vs 495 # [streambuf FAILED] - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + # disable tests on aarch32, the following tests fail there: + # sandbox/is_active: [forking] Feb 06 17:43:14.224 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:146: assert(sandbox_is_active()) + # [is_active FAILED] + # sandbox/open_filename: [forking] Feb 06 17:43:14.279 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:170: assert(fd OP_EQ -1): 9 vs -1 + # [open_filename FAILED] + # sandbox/opendir_dirname: [forking] Feb 06 17:43:14.343 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:271: assert(dir OP_EQ NULL): 0xdf8300 vs (nil) + # [opendir_dirname FAILED] + # sandbox/openat_filename: [forking] Feb 06 17:43:14.400 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:249: assert(fd OP_EQ -1): 9 vs -1 + # [openat_filename FAILED] + # sandbox/chmod_filename: [forking] Feb 06 17:43:14.493 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:190: assert(rc OP_EQ -1): 0 vs -1 + # [chmod_filename FAILED] + # sandbox/chown_filename: [forking] Feb 06 17:43:14.561 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:208: assert(rc OP_EQ -1): 0 vs -1 + # [chown_filename FAILED] + # sandbox/rename_filename: [forking] Feb 06 17:43:14.629 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) + # FAIL src/test/test_sandbox.c:228: assert(rc OP_EQ -1): 0 vs -1 + # [rename_filename FAILED] + + doCheck = !(stdenv.isDarwin && stdenv.isAarch64) && !(stdenv.isLinux && stdenv.isAarch32); postInstall = '' mkdir -p $geoip/share/tor From 34773db54631988465245b35eeecfa03c271bebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C8=98erb=C4=83nescu?= Date: Fri, 9 Feb 2024 19:00:12 +0100 Subject: [PATCH 2/3] tor: removed obsolete statement from doCheck expression --- pkgs/tools/security/tor/default.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix index 2e1146c5cb1e..a3164ffb6ffe 100644 --- a/pkgs/tools/security/tor/default.nix +++ b/pkgs/tools/security/tor/default.nix @@ -70,14 +70,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # disable tests on aarch64-darwin, the following tests fail there: - # oom/circbuf: [forking] - # FAIL src/test/test_oom.c:187: assert(c1->marked_for_close) - # [circbuf FAILED] - # oom/streambuf: [forking] - # FAIL src/test/test_oom.c:287: assert(x_ OP_GE 500 - 5): 0 vs 495 - # [streambuf FAILED] - # disable tests on aarch32, the following tests fail there: + # disable tests on linux aarch32, the following tests fail there: # sandbox/is_active: [forking] Feb 06 17:43:14.224 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) # FAIL src/test/test_sandbox.c:146: assert(sandbox_is_active()) # [is_active FAILED] @@ -99,8 +92,7 @@ stdenv.mkDerivation rec { # sandbox/rename_filename: [forking] Feb 06 17:43:14.629 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) # FAIL src/test/test_sandbox.c:228: assert(rc OP_EQ -1): 0 vs -1 # [rename_filename FAILED] - - doCheck = !(stdenv.isDarwin && stdenv.isAarch64) && !(stdenv.isLinux && stdenv.isAarch32); + doCheck = !(stdenv.isLinux && stdenv.isAarch32); postInstall = '' mkdir -p $geoip/share/tor From bbe7193ab0624808cd3263e590b739bb8cfb9e90 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 21 Feb 2024 11:08:28 -0300 Subject: [PATCH 3/3] tor: replace long comment with a link to upstream bugtracker --- pkgs/tools/security/tor/default.nix | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix index a3164ffb6ffe..050894307503 100644 --- a/pkgs/tools/security/tor/default.nix +++ b/pkgs/tools/security/tor/default.nix @@ -70,28 +70,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # disable tests on linux aarch32, the following tests fail there: - # sandbox/is_active: [forking] Feb 06 17:43:14.224 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:146: assert(sandbox_is_active()) - # [is_active FAILED] - # sandbox/open_filename: [forking] Feb 06 17:43:14.279 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:170: assert(fd OP_EQ -1): 9 vs -1 - # [open_filename FAILED] - # sandbox/opendir_dirname: [forking] Feb 06 17:43:14.343 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:271: assert(dir OP_EQ NULL): 0xdf8300 vs (nil) - # [opendir_dirname FAILED] - # sandbox/openat_filename: [forking] Feb 06 17:43:14.400 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:249: assert(fd OP_EQ -1): 9 vs -1 - # [openat_filename FAILED] - # sandbox/chmod_filename: [forking] Feb 06 17:43:14.493 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:190: assert(rc OP_EQ -1): 0 vs -1 - # [chmod_filename FAILED] - # sandbox/chown_filename: [forking] Feb 06 17:43:14.561 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:208: assert(rc OP_EQ -1): 0 vs -1 - # [chown_filename FAILED] - # sandbox/rename_filename: [forking] Feb 06 17:43:14.629 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.8.10 ) - # FAIL src/test/test_sandbox.c:228: assert(rc OP_EQ -1): 0 vs -1 - # [rename_filename FAILED] + # disable tests on linux aarch32 + # https://gitlab.torproject.org/tpo/core/tor/-/issues/40912 doCheck = !(stdenv.isLinux && stdenv.isAarch32); postInstall = ''