Warning · Test quality
Impact
The test still passes if the contender writes a staged executable before attempting the lock and deletes it on refusal.
Recommended action
Instrument stage creation and assert that the competing call never reaches it while the lock is held.