Skip to content

Commit acb4820

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 c05919d commit acb4820

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,10 @@ def setup(self) -> None:
912912
913913
Setup the guest after it has been started. It is called after :py:meth:`Guest.start`.
914914
"""
915+
from tmt.steps.execute.internal import effective_pidfile_root
916+
pid_directory = effective_pidfile_root()
917+
self.execute(ShellScript(f"mkdir -p {pid_directory}"))
918+
self.execute(ShellScript(f"chmod ugo+rwx {pid_directory}"))
915919

916920
# A couple of requiremens for this field:
917921
#

0 commit comments

Comments
 (0)