Project

General

Profile

Bug #12932

Some SMB2 oplock break cases fail in the Windows Protocol Test Suite

Added by Gordon Ross 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cifs - CIFS server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

How to reproduce:
Run the Windows Protocol Test Suite (WPTS)
https://github.com/microsoft/WindowsProtocolTestSuites

Select the file server, SMB2 oplock+lease cases, run.
Alternatively, use the WPTS "play list" attached to select the right cases.

Here's a diff of the results before/after the fix (failed cases now pass)

diff bsr-R22-before.txt bsr-R22-after.txt
8c8
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS847
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS847
11c11
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS675
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS675
24c24
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS492
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS492
29c29
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1363
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1363
31c31
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1380
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1380
43c43
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1150
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1150
48c48
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1063
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS1063
51c51
< Failed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS0
---
> Passed OplockOnShareWithoutForceLevel2OrSOFSTestCaseS0


Files

oplock-tests.playlist (8.81 KB) oplock-tests.playlist Gordon Ross, 2020-07-06 04:52 PM

History

#2

Updated by Gordon Ross 3 months ago

  • Subject changed from Some SMB2 Lease break cases fail in the Windows Protocol Test Suite to Some SMB2 oplock break cases fail in the Windows Protocol Test Suite
#3

Updated by Gordon Ross 3 months ago

The problem here is that the test suite expects specific error returns when an oplock "ack break" operation comes in without the server having sent an oplock break to the client. From a protocol viewpoint, these can be thought of as "unsolicited ack" messages.

In the oplock break ack handler, check whether we're expecting a "break ack", and if not, return an error.
Which error depends on what the break ack is trying to do.

BTW, this fix was the result of a collaboration between Andy Stormont and Gordon Ross.

#4

Updated by Electric Monk 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit dde7ba523f4198e0f5b40039179233749a87f105

commit  dde7ba523f4198e0f5b40039179233749a87f105
Author: Gordon Ross <gwr@nexenta.com>
Date:   2020-07-24T22:01:05.000Z

    12932 Some SMB2 oplock break cases fail in the Windows Protocol Test Suite
    Portions contributed by: Andrew Stormont <astormont@racktopsystems.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF