diff --git a/docs/overview.rst b/docs/overview.rst index 3910b32ee9..6e3ed359a7 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -486,9 +486,11 @@ TMT_TEST_PIDFILE, TMT_TEST_PIDFILE_LOCK making any changes to the pid file. TMT_TEST_PIDFILE_ROOT - By default, the test pidfile file is stored in the ``$TMT_WORKDIR_ROOT`` + By default, the test pidfile file is stored in ``/var/tmp`` directory. If specified, the directory in this variable would be - used instead. + used instead. The directory permissions should follow the pattern + of temporary directory permissions, e.g. ``chmod 1777``, to + allow access to users with all privilege levels. Plugin Variables ---------------- diff --git a/tests/execute/reboot/out-of-session.sh b/tests/execute/reboot/out-of-session.sh index 9cd24ee771..f1147a1fed 100755 --- a/tests/execute/reboot/out-of-session.sh +++ b/tests/execute/reboot/out-of-session.sh @@ -41,7 +41,7 @@ rlJournalStart # and use it to issue a `tmt-reboot` from outside the direct process tree of the test. set -x - tmt_reboot_command="export TMT_TEST_PIDFILE=/var/tmp/tmt/tmt-test.pid; export TMT_TEST_PIDFILE_LOCK=/var/tmp/tmt/tmt-test.pid.lock; export TMT_DEBUG=1; tmt-reboot" + tmt_reboot_command="export TMT_TEST_PIDFILE=/var/tmp/tmt-test.pid; export TMT_TEST_PIDFILE_LOCK=/var/tmp/tmt-test.pid.lock; export TMT_DEBUG=1; tmt-reboot" if [ "$method" = "container" ]; then podman_exec="$(sed -nr 's/\s*Run command: (podman exec .*) \/bin\/bash.*cd.*/\1/p' tmt.output)" diff --git a/tmt/steps/execute/scripts/tmt-reboot b/tmt/steps/execute/scripts/tmt-reboot index c906ab933f..259dbec0b2 100755 --- a/tmt/steps/execute/scripts/tmt-reboot +++ b/tmt/steps/execute/scripts/tmt-reboot @@ -6,7 +6,7 @@ [ -n "$TMT_DEBUG" ] && set -x -TMT_TEST_PIDFILE_LOCK="${TMT_TEST_PIDFILE_LOCK:-/var/tmp/tmt/tmt-test.pid}" +TMT_TEST_PIDFILE_LOCK="${TMT_TEST_PIDFILE_LOCK:-/var/tmp/tmt-test.pid}" PATH=/sbin:/usr/sbin:$PATH diff --git a/tmt/steps/execute/scripts/tmt-reboot-core b/tmt/steps/execute/scripts/tmt-reboot-core index 1d274fa5b4..96ed3b8aba 100755 --- a/tmt/steps/execute/scripts/tmt-reboot-core +++ b/tmt/steps/execute/scripts/tmt-reboot-core @@ -2,7 +2,7 @@ [ -n "$TMT_DEBUG" ] && set -x -TMT_TEST_PIDFILE="${TMT_TEST_PIDFILE:-/var/tmp/tmt/tmt-test.pid}" +TMT_TEST_PIDFILE="${TMT_TEST_PIDFILE:-/var/tmp/tmt-test.pid}" if [ ! -e "$TMT_TEST_PIDFILE" ]; then echo "There is no running test to signal the reboot to!"