From 7458f7da3961a4660bfa002d86e9b47c7de79d40 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Thu, 7 Apr 2016 12:36:27 -0700 Subject: [PATCH] winfsp-tests: lock-test --- tst/winfsp-tests/lock-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tst/winfsp-tests/lock-test.c b/tst/winfsp-tests/lock-test.c index 7126ebb2..1ab97300 100644 --- a/tst/winfsp-tests/lock-test.c +++ b/tst/winfsp-tests/lock-test.c @@ -275,6 +275,8 @@ static void lock_overlapped_dotest(ULONG Flags, PWSTR VolPrefix, PWSTR Prefix, U Overlapped.Offset = BytesPerSector + BytesPerSector / 2; Success = LockFileEx(Handle, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, BytesPerSector, 0, &Overlapped); + ASSERT(Success || ERROR_IO_PENDING == GetLastError() || ERROR_LOCK_VIOLATION == GetLastError()); + Success = GetOverlappedResult(Handle, &Overlapped, &BytesTransferred, TRUE); ASSERT(!Success && ERROR_LOCK_VIOLATION == GetLastError()); Overlapped.Offset = 0;