Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BVT_Leasing_FileLeasingV2 occasionally fails #36

Closed
gwr opened this issue Jan 29, 2022 · 1 comment
Closed

BVT_Leasing_FileLeasingV2 occasionally fails #36

gwr opened this issue Jan 29, 2022 · 1 comment

Comments

@gwr
Copy link

gwr commented Jan 29, 2022

I see this occasionally when running the WPTS, category BVT, SMB2 tests.
This appears to be a test bug in BVT_Leasing_FileLeasingV2.
This test usually passes, and always passes for me if I run that test alone.

When run along with all the BVT SMB2 tests, the test client occasionally
returns an incorrect response to the server's lease break notification,
where the lease break had state going from 3 to 0, and the
lease break acknowledgment had state 3 (should be zero).

Details of those two packets:

No.     Time           Source                Destination           Protocol Length Info
   7298 30.300534      192.168.202.132       192.168.202.1         SMB2     178    Lease Break Notification

Frame 7298: 178 bytes on wire (1424 bits), 178 bytes captured (1424 bits) on interface bridge100, id 0
Ethernet II, Src: 00:0c:29:5a:4b:25, Dst: 16:7d:da:14:e7:64
Internet Protocol Version 4, Src: 192.168.202.132, Dst: 192.168.202.1
Transmission Control Protocol, Src Port: 445, Dst Port: 62589, Seq: 1321, Ack: 1450, Len: 112
NetBIOS Session Service
SMB2 (Server Message Block Protocol version 2)
    SMB2 Header
    Lease Break Notification (0x12)
        StructureSize: 0x002c
        Lease Epoch: 0x0003
        Lease Flags: 0x00000001, Break Ack Required
        Lease Key: 5ae7ccf5-715d-489b-ad25-55bb1cf0fadb
        Current Lease State: 0x00000003, Read Caching, Handle Caching
        New Lease State: 0x00000000
        Lease Break Reason: 0x00000000
        Access Mask Hint: 0x00000000
        Share Mask Hint: 0x00000000

No.     Time           Source                Destination           Protocol Length Info
   7300 30.303692      192.168.202.1         192.168.202.132       SMB2     170    Lease Break Acknowledgment

Frame 7300: 170 bytes on wire (1360 bits), 170 bytes captured (1360 bits) on interface bridge100, id 0
Ethernet II, Src: 16:7d:da:14:e7:64, Dst: 00:0c:29:5a:4b:25
Internet Protocol Version 4, Src: 192.168.202.1, Dst: 192.168.202.132
Transmission Control Protocol, Src Port: 62589, Dst Port: 445, Seq: 1450, Ack: 1433, Len: 104
NetBIOS Session Service
SMB2 (Server Message Block Protocol version 2)
    SMB2 Header
    Lease Break Acknowledgment (0x12)
        StructureSize: 0x0024
        Reserved: 0000
        Lease Flags: 0x00000000
        Lease Key: 5ae7ccf5-715d-489b-ad25-55bb1cf0fadb
        Lease State: 0x00000003, Read Caching, Handle Caching.            <<< Wrong!
        Lease Duration: 0x0000000000000000

wpts-leasing-v2b.pcapng.gz

Dingshouqing pushed a commit to microsoft/WindowsProtocolTestSuites that referenced this issue Feb 16, 2022
…sumed more than one times.

## Pull Request Checklist
### General
- [x] Are all regression test passed?
- [ ] Are there any test cases that will expose unfixed TDIs or Windows bugs?

### New Test Case
- [ ] Have Design Spec and User Guide been updated?
- [ ] Can all the test cases be loaded and executed by PTM & PTMCli?
- [ ] Can the related changes support multiple platform(Windows, Linux, MacOS)?

### SDK Changes
- [ ] Are all related test suites Regression passed?

Should fix [PTF GitHub issue #36](microsoft/ProtocolTestFramework#36).

1 Use `AutoResetEvent` to reset the event to non-signaled state when a notification has been consumed.
2 Initialize all the event states to non-signaled during test case initialization.

Related work items: #38115536
@gwr
Copy link
Author

gwr commented Feb 25, 2022

That fix works well for me. Thank-you very much.

@gwr gwr closed this as completed Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants