Neels Hofmeyr | 936a81e | 2017-09-14 01:31:41 +0200 | [diff] [blame] | 1 | creating files |
| 2 | launch a program that locks a given file, it will create $dir/lock_test |
| 3 | wait until this lock_test lock file was created by program |
| 4 | expecting the lock file to reflect "long name" |
Neels Hofmeyr | a6278b7 | 2017-05-10 13:46:11 +0200 | [diff] [blame] | 5 | launched first, locked by: 'long name' |
Neels Hofmeyr | 936a81e | 2017-09-14 01:31:41 +0200 | [diff] [blame] | 6 | launching second program, should find the lock intact and wait |
Neels Hofmeyr | a6278b7 | 2017-05-10 13:46:11 +0200 | [diff] [blame] | 7 | launched second, locked by: 'long name' |
Neels Hofmeyr | 936a81e | 2017-09-14 01:31:41 +0200 | [diff] [blame] | 8 | drop the first lock, $f1 removal signals the first process to stop locking |
| 9 | wait for first program to carry out the lock release |
| 10 | now expecting second program to lock |
Neels Hofmeyr | a6278b7 | 2017-05-10 13:46:11 +0200 | [diff] [blame] | 11 | waited, locked by: 'shorter' |
Neels Hofmeyr | 936a81e | 2017-09-14 01:31:41 +0200 | [diff] [blame] | 12 | release the second program also |
| 13 | expecting the lock to be gone |
Neels Hofmeyr | a6278b7 | 2017-05-10 13:46:11 +0200 | [diff] [blame] | 14 | waited more, locked by: '' |