diff --git a/src/borg/testsuite/helpers.py b/src/borg/testsuite/helpers.py index 0f96ad6cce..12717821df 100644 --- a/src/borg/testsuite/helpers.py +++ b/src/borg/testsuite/helpers.py @@ -800,7 +800,9 @@ def test_get_runtime_dir(monkeypatch): else: monkeypatch.delenv("XDG_RUNTIME_DIR", raising=False) monkeypatch.delenv("BORG_RUNTIME_DIR", raising=False) - assert get_runtime_dir() == os.path.join("/run/user", str(os.getuid()), "borg") + assert get_runtime_dir() in [os.path.join("/run/user", str(os.getuid()), "borg"), + os.path.join("/var/run/user", str(os.getuid()), "borg"), + os.path.join("/tmp/runtime-" + str(os.getuid()), "borg")] monkeypatch.setenv("XDG_RUNTIME_DIR", "/var/tmp/.cache") assert get_runtime_dir() == os.path.join("/var/tmp/.cache", "borg") monkeypatch.setenv("BORG_RUNTIME_DIR", "/var/tmp")