action #178207
closedcoordination #127031: [saga][epic] openQA for SUSE customers
coordination #165393: [epic] Improved code coverage in openQA
t: Many leftover t/poolXXXX directories in openQA size:S
0%
Description
Observation¶
When I run t/24-worker-overall.t
I see a new directory t/pool5J9L
in my git worktree.
If I run this test many times, new directories are created over and over.
I also had a look at other tests and found t/24-worker-engine.t
and t/24-worker-jobs.t
which are creating a tempdir under the git worktree.
my $pool_directory = tempdir('poolXXXX');
We should avoid doing this and use a directory under /tmp instead.
Yes, .gitignore
has pool????/
, but that doesn't mean I want 1000 of those directories lying around.
Acceptance Criteria¶
AC1: t/24-worker-*
tests are creating their tempdirs under /tmp and not the git worktree.
AC2: The cleanup of the dirs in t/24-worker-overall.t
is working.
Suggestions¶
There are two issues going on here:
t/24-worker-overall.t
creates a tempdir 3 times, but one of them is not cleaned up. I believe this is because the worker is still holding the pool dir lock when the cleanup is called. This should be fixed in any case, even if me move this under /tmp.- for
t/24-worker-engine.t
andt/24-worker-jobs.t
I see no leftover directories because they get cleaned up correctly. However, it could still happen that the test dies and it doesn't get cleaned up for some reason. We should be consistent and do not add or modify any files in git during tests.
Updated by tinita about 1 month ago
- Copied from action #178180: Test t/14-grutasks.t fails for me in master branch but apparently not in circleCI added
Updated by okurz about 1 month ago
- Target version set to future
- Parent task set to #165393
Updated by okurz 10 days ago
- Copied to action #179708: Ensure clean git status in openQA tests added
Updated by gpuliti 9 days ago
pr for AC1: https://github.com/os-autoinst/openQA/pull/6345