Subject: | Tests fail if multiple instances are running |
If multiple instances are running the test suite (which may happen on smoker systems), then it's quite likely that the tests fails. I see the following on my smoker:
# Failed test 'lock OK'
# at t/10_by-myself.t line 16.
# Failed test 'pid myself'
# at t/10_by-myself.t line 17.
# got: '31470'
# expected: '31486'
# Failed test 'lock OK (last locked proc is myself)'
# at t/10_by-myself.t line 25.
# Failed test 'pid myself'
# at t/10_by-myself.t line 26.
# got: '31470'
# expected: '31486'
# Failed test 'lock OK (expired)'
# at t/10_by-myself.t line 32.
# Failed test 'pid myself'
# at t/10_by-myself.t line 33.
# got: '31470'
# expected: '31486'
# Looks like you failed 6 tests of 9.
t/10_by-myself.t .....
Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/9 subtests
(etc)
Probably it's better to use a temporary directory created by File::Temp, and put the lockfiles into this directory.