Skip to content

treegen: create temporary files in VARDIR#473

Merged
locker merged 1 commit into
tarantool:masterfrom
locker:treegen-vardir
Jul 3, 2026
Merged

treegen: create temporary files in VARDIR#473
locker merged 1 commit into
tarantool:masterfrom
locker:treegen-vardir

Conversation

@locker

@locker locker commented Jul 3, 2026

Copy link
Copy Markdown
Member

The treegen module uses fio.tempdir() for creating temporary directories. The latter uses /tmp as the base directory. This is bad because if a test fails or the KEEP_DATA environment variable is set, temporary directories are not removed, thus polluting /tmp.

Let's override TMPDIR to VARDIR to force fio.tempdir() use VARDIR (/tmp/t by default) for creating temporary files.

Closes #467

The `treegen` module uses `fio.tempdir()` for creating temporary
directories. The latter uses `/tmp` as the base directory. This is bad
because if a test fails or the KEEP_DATA environment variable is set,
temporary directories are not removed, thus polluting `/tmp`.

Let's override TMPDIR to VARDIR to force `fio.tempdir()` use VARDIR
(`/tmp/t` by default) for creating temporary files.

Closes tarantool#467
@locker
locker requested a review from nshy July 3, 2026 11:01
@Totktonada

Copy link
Copy Markdown
Member

We may want to create directories outside of /tmp/t if KEEPDIR is enabled, because /tmp/t will be pruned by the next test run.

@nshy nshy assigned locker and unassigned locker and nshy Jul 3, 2026
@locker

locker commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

We may want to create directories outside of /tmp/t if KEEPDIR is enabled, because /tmp/t will be pruned by the next test run.

You can always use the --no-clean luatest option to avoid that. Or you can just copy /tmp/t to a safe location if you want to examine artifacts. Note that test-run uses a unique VARDIR for each test worker.

@locker
locker merged commit 64e8b9e into tarantool:master Jul 3, 2026
8 checks passed
@locker
locker deleted the treegen-vardir branch July 3, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treegen helper pollutes system tmp directory

3 participants