lock: add more test cases