Do not pass os.O_TRUNC to open(), that immediately empties out the lock file.
Fix lock_test to be able to catch this error. So far things were happening too
fast to notice it.
Caught by running 'make check' on a main unit APU that has different timing
behavior.
Change-Id: I872a3d2548ac84097ac7acf13cb12c36822e076e
Remove the stdout printing from the lock_test_help.py, so that there is no
problem with a failing test because one output ending up in stdout before the
other. So only output the current lock from lock_test.sh.
Change-Id: I7fe80a9de88ddee1d66ca5c692948fc9673e4230
Before, the test would rely on timeouts to work out. Instead, use marker files
to indicate whether to wait longer. Firstly to signal a blocking process should
end, secondly that it has indeed ended.
Also use a mktemp tempdir instead of /tmp