Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/var/tmp/tmt result dir is removed if it is symlink and replaced by regular directory #3151

Open
jscotka opened this issue Aug 16, 2024 · 1 comment
Labels
code | core Implementation of the core metadata level good first issue Good for newcomers

Comments

@jscotka
Copy link
Collaborator

jscotka commented Aug 16, 2024

Hi,
I wanted to avoid to set TMT_WORKDIR_ROOT everytime so I've decided to do symlink /var/tmp/tmt -> /home/jscotka/tmt-output to my home dir.
And TMT removed my symlink and replaced it by directory.
I see there 2 possible issues:

  1. TMT should not remove any file if exist, it is dangerous if user can have there some data.
  2. TMT should folow /var/tmp/tmt symlink and after it found the target is dir TMT should be happy enough and use it.

Thanks&Regards
Honza

@happz happz added good first issue Good for newcomers code | core Implementation of the core metadata level labels Aug 16, 2024
@lukaszachy
Copy link
Collaborator

@jscotka Could you please provide step-by-step, ideally on fresh machine? I wasn't able to reproduce with:

# tmt --version
tmt version: 1.35.0

# ls -l /var/tmp/
total 4
lrwxrwxrwx. 1 root root 14 Aug 27 16:38 tmt -> /home/foo/THIS
-rw-r--r--. 1 root root  0 Aug 27 16:38 tmt-test.pid.lock

# tmt run
....
total: 1 test passed

# ls -l /var/tmp/
total 4
lrwxrwxrwx. 1 root root 14 Aug 27 16:38 tmt -> /home/foo/THIS
-rw-r--r--. 1 root root  0 Aug 27 16:38 tmt-test.pid.lock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code | core Implementation of the core metadata level good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants