Skip to content

Commit 22ff571

Browse files
committed
Makes the pidfile accessible by everyone
Creates the pidfile at an accessible location for every user, this way the manage pidfile warning is avoided. Signed-off-by: mcasquer <[email protected]>
1 parent b871f30 commit 22ff571

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tmt/steps/execute/internal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
TEST_PIDFILE_LOCK_FILENAME = f'{TEST_PIDFILE_FILENAME}.lock'
3535

3636
#: The default directory for storing test pid file.
37-
TEST_PIDFILE_ROOT = Path('/var/tmp') # noqa: S108 insecure usage of temporary dir
37+
TEST_PIDFILE_ROOT = Path('/var/tmp/pid') # noqa: S108 insecure usage of temporary dir
3838

3939

4040
def effective_pidfile_root() -> Path:

tmt/steps/provision/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,9 @@ def setup(self) -> None:
885885
886886
Setup the guest after it has been started. It is called after :py:meth:`Guest.start`.
887887
"""
888+
pid_directory = '/var/tmp/pid' # noqa: S108 insecure usage of temporary dir
889+
Path(pid_directory).mkdir(parents=True, exist_ok=True)
890+
self.execute(ShellScript(f"chmod ugo+rwx {pid_directory}"))
888891

889892
# A couple of requiremens for this field:
890893
#

0 commit comments

Comments
 (0)