diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-05-10 13:46:11 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-05-11 10:31:46 +0000 |
commit | 2321a19aa52fc55c07436b062390eef7c440750d (patch) | |
tree | 06bc3f2f2aa32477e1ed22a1d8c1bd6b9b099ea2 /selftest | |
parent | 4f33dcc4dfdb64f02541190068fe2b069fa31e37 (diff) |
lock test: make more robust against timing
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
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/lock_test.ok | 4 | ||||
-rw-r--r-- | selftest/lock_test_help.py | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 0e3db40..d7152ac 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,8 +1,4 @@ -acquired lock: 'long name' launched first, locked by: long name launched second, locked by: long name -leaving lock: 'long name' -acquired lock: 'shorter' waited, locked by: shorter -leaving lock: 'shorter' waited more, locked by: diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index 7b6dfa1..bdf7c64 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -14,12 +14,8 @@ lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) with fl: - print('acquired lock: %r' % fl.owner) - sys.stdout.flush() while os.path.exists(stop_signalling_file): time.sleep(.1) - print('leaving lock: %r' % fl.owner) - sys.stdout.flush() touch_file(stop_signalling_file + '.done') # vim: expandtab tabstop=4 shiftwidth=4 |