Skip to content

Commit

Permalink
test: add new pytest.ini and use --basetemp=/var/tmp by default
Browse files Browse the repository at this point in the history
Our test images can easily be 10GB and if /tmp is mounted via a tmpfs
that can be too much for low memory systems. Hence switch to
/var/tmp by default.

Note that we do not really need 10GB as it's a sparse files but if
/tmp is too small we still get ENOSPC.
  • Loading branch information
mvo5 committed Jan 23, 2024
1 parent 673ce92 commit 21c78c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
pytest -rs -s -vv
pytest -rs -s -vv --basetemp="$TMPDIR"
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
# do not use /tmp by default as it may be on a tempfs and our tests can
# generate 10G images (that full of holes so not really 10G but still)
addopts = --basetemp=/var/tmp

0 comments on commit 21c78c2

Please sign in to comment.