public void Smb2OverRdmaChannel_InvalidBufferDescriptor_DeregisteredBuffer() { InitSmbdConnectionForTestCases(smbdAdapter.TestConfig.TestFileName_LargeFile); // SMB2 Read file BaseTestSite.Log.Add(LogEntryKind.TestStep, "Register memory and get buffer descriptor for SMB2 WRITE"); SmbdBufferDescriptorV1 descp; smbdAdapter.SmbdRegisterBuffer( smbdAdapter.Smb2MaxReadSize, SmbdBufferReadWrite.RDMA_WRITE_PERMISSION_FOR_READ_FILE, out descp); smbdAdapter.SmbdDeregisterBuffer(descp); byte[] channelInfo = TypeMarshal.ToBytes <SmbdBufferDescriptorV1>(descp); BaseTestSite.Log.Add(LogEntryKind.TestStep, "Read content from file over RDMA."); READ_Response readResponse; byte[] readData; try { NtStatus status = (NtStatus)smbdAdapter.Smb2ReadOverRdmaChannel( 0, smbdAdapter.Smb2MaxReadSize, channelInfo, out readResponse, out readData ); BaseTestSite.Assert.AreNotEqual <NtStatus>( NtStatus.STATUS_SUCCESS, status, "Status of SMB2 Read File is {0}", status); } catch (TimeoutException) { BaseTestSite.Assert.Pass("No SMB2 READ response received"); } BaseTestSite.Log.Add(LogEntryKind.TestStep, "Disconnect and reconnect to verify server is available."); smbdAdapter.DisconnectRdma(); smbdAdapter.ConnectToServerOverRDMA(); }