teemtee / tmt

Test Management Tool
MIT License
76 stars 112 forks source link

Only first user can run provision -h local. Other lack lock file permissions. #2877

Open lukaszachy opened 3 weeks ago

lukaszachy commented 3 weeks ago

As a root create two users and execute tmt run for each of them in sequence:

# useradd A
# su -l A
$ tmt init -t mini
$ tmt run -a provision -h local
....
total: 1 test passed

$ logout

# useradd B
# su -l B
$ tmt init -t mini
$ tmt run -a provision -h local
...
warn: Test failed to manage its pidfile.
...
total: 1 error

Debug output shows

            errr /script-00 (pidfile locking)
                output.txt: /var/tmp/tmt/run-007/plans/example/execute/data/guest/default-0/script-00-1/output.txt
        Workdir '/var/tmp/tmt/run-007/plans/example/report/default-0' created.
        Read file '/var/tmp/tmt/run-007/plans/example/execute/data/guest/default-0/script-00-1/output.txt'.
                content: flock: cannot open lock file /var/tmp/tmt-test.pid.lock: Permission denied