From dd4269becd2b60c57b29e7ce2ecace2dc83c4073 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 2 Dec 2025 15:07:46 +0200 Subject: [PATCH 1/4] nixosTests.syncthing-many-devices: resurrect Fixes #447674 --- nixos/tests/all-tests.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9902d3e7e686..df123faaad79 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1457,9 +1457,7 @@ in syncthing-guiPassword = runTest ./syncthing/guiPassword.nix; syncthing-guiPasswordFile = runTest ./syncthing/guiPasswordFile.nix; syncthing-init = runTest ./syncthing/init.nix; - # FIXME: Test has been failing since 2025-07-06: - # https://github.com/NixOS/nixpkgs/issues/447674 - # syncthing-many-devices = runTest ./syncthing/many-devices.nix; + syncthing-many-devices = runTest ./syncthing/many-devices.nix; syncthing-no-settings = runTest ./syncthing/no-settings.nix; syncthing-relay = runTest ./syncthing/relay.nix; sysfs = runTest ./sysfs.nix; From 6c857f20038d2ea8d7dd9eff5fa16feeabd3caab Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 2 Dec 2025 15:08:47 +0200 Subject: [PATCH 2/4] nixosTests.syncthing-many-devices: reduce curl's #retries --- nixos/tests/syncthing/many-devices.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/syncthing/many-devices.nix b/nixos/tests/syncthing/many-devices.nix index 0c704b3d4048..8b0fffee0517 100644 --- a/nixos/tests/syncthing/many-devices.nix +++ b/nixos/tests/syncthing/many-devices.nix @@ -138,7 +138,7 @@ let (printf "X-API-Key: "; cat "$RUNTIME_DIRECTORY/api_key") >"$RUNTIME_DIRECTORY/headers" ${pkgs.curl}/bin/curl -sSLk -H "@$RUNTIME_DIRECTORY/headers" \ - --retry 1000 --retry-delay 1 --retry-all-errors \ + --retry 5 --retry-delay 1 --retry-all-errors \ "$@" } curl -d ${lib.escapeShellArg (builtins.toJSON { deviceID = IDsToDelete.device; })} \ From 97d5c7782dd3e8bf741d7a0dcf4fb001f3347cb4 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 2 Dec 2025 15:12:24 +0200 Subject: [PATCH 3/4] nixosTests.syncthing-many-devices: fix Use a name & path attributes for device & folder JSON object, otherwise the following error is observed when running manually the script: folder "DeleteMe": folder has empty path --- nixos/tests/syncthing/many-devices.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/syncthing/many-devices.nix b/nixos/tests/syncthing/many-devices.nix index 8b0fffee0517..dd2d509601a3 100644 --- a/nixos/tests/syncthing/many-devices.nix +++ b/nixos/tests/syncthing/many-devices.nix @@ -141,9 +141,9 @@ let --retry 5 --retry-delay 1 --retry-all-errors \ "$@" } - curl -d ${lib.escapeShellArg (builtins.toJSON { deviceID = IDsToDelete.device; })} \ + curl -d ${lib.escapeShellArg (builtins.toJSON { deviceID = IDsToDelete.device; name = "DeleteMe"; })} \ -X POST 127.0.0.1:8384/rest/config/devices - curl -d ${lib.escapeShellArg (builtins.toJSON { id = IDsToDelete.folder; })} \ + curl -d ${lib.escapeShellArg (builtins.toJSON { id = IDsToDelete.folder; path = "/var/lib/syncthing/DeleteMe"; })} \ -X POST 127.0.0.1:8384/rest/config/folders ''; in From 8c7309198743ddaf55732d7c2c8f5343678a0545 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 2 Dec 2025 15:21:27 +0200 Subject: [PATCH 4/4] nixosTests.syncthing-many-devices: nixfmt --- nixos/tests/syncthing/many-devices.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/nixos/tests/syncthing/many-devices.nix b/nixos/tests/syncthing/many-devices.nix index dd2d509601a3..b69c06181c9a 100644 --- a/nixos/tests/syncthing/many-devices.nix +++ b/nixos/tests/syncthing/many-devices.nix @@ -141,9 +141,23 @@ let --retry 5 --retry-delay 1 --retry-all-errors \ "$@" } - curl -d ${lib.escapeShellArg (builtins.toJSON { deviceID = IDsToDelete.device; name = "DeleteMe"; })} \ + curl -d ${ + lib.escapeShellArg ( + builtins.toJSON { + deviceID = IDsToDelete.device; + name = "DeleteMe"; + } + ) + } \ -X POST 127.0.0.1:8384/rest/config/devices - curl -d ${lib.escapeShellArg (builtins.toJSON { id = IDsToDelete.folder; path = "/var/lib/syncthing/DeleteMe"; })} \ + curl -d ${ + lib.escapeShellArg ( + builtins.toJSON { + id = IDsToDelete.folder; + path = "/var/lib/syncthing/DeleteMe"; + } + ) + } \ -X POST 127.0.0.1:8384/rest/config/folders ''; in