mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 01:41:57 -04:00
Merge pull request #9741 from ThomasWaldmann/fix-omnios-tmp-tmpdir
This commit is contained in:
commit
2600428f81
3 changed files with 15 additions and 1 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -540,6 +540,12 @@ jobs:
|
|||
sudo python3 -m ensurepip
|
||||
sudo python3 -m pip install virtualenv
|
||||
|
||||
# On omniOS /tmp is swap-backed tmpfs (small, RAM-bound), so the pip/cargo
|
||||
# build temps and the pytest temp tree quickly exhaust it ("no space left on
|
||||
# device"). /var/tmp is disk-backed (ZFS), so redirect TMPDIR there.
|
||||
export TMPDIR=/var/tmp/borg-ci
|
||||
mkdir -p "$TMPDIR"
|
||||
|
||||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
python -V
|
||||
|
|
|
|||
|
|
@ -833,7 +833,14 @@ def test_extract_y2261(archivers, request):
|
|||
create_regular_file(archiver.input_path, "file_y2261", contents=b"post y2038 test")
|
||||
# 2261-01-01 00:00:00 UTC as a Unix timestamp (seconds).
|
||||
time_y2261 = 9183110400
|
||||
os.utime("input/file_y2261", (time_y2261, time_y2261))
|
||||
try:
|
||||
os.utime("input/file_y2261", (time_y2261, time_y2261))
|
||||
except OSError as e:
|
||||
if e.errno == errno.EOVERFLOW:
|
||||
# some filesystems/platforms cannot store timestamps beyond y2038
|
||||
# (e.g. ZFS on omniOS rejects this with EOVERFLOW).
|
||||
pytest.skip("filesystem cannot store post-y2038 timestamps")
|
||||
raise
|
||||
cmd(archiver, "repo-create", RK_ENCRYPTION)
|
||||
cmd(archiver, "create", "test", "input")
|
||||
with changedir("output"):
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ def test_get_runtime_dir(monkeypatch):
|
|||
os.path.join("/var/run/user", uid, "borg"),
|
||||
os.path.join(f"/tmp/runtime-{uid}", "borg"),
|
||||
os.path.join(f"/mnt/eafs/tmp/runtime-{uid}", "borg"), # CI netbsd
|
||||
os.path.join(f"/var/tmp/borg-ci/runtime-{uid}", "borg"), # CI omnios (TMPDIR)
|
||||
]
|
||||
monkeypatch.setenv("XDG_RUNTIME_DIR", "/var/tmp/.cache")
|
||||
assert get_runtime_dir(create=False) == os.path.join("/var/tmp/.cache", "borg")
|
||||
|
|
|
|||
Loading…
Reference in a new issue