The samba4.smb2.lock.CANCEL test is currently failing against Samba4 SMB2 server. I don't have much more detail at the moment, but the test is exercising the server's ability to pend a BRL requests, send back and asynchronous response, and then have that response be canceled with an explicit SMB2_CANCEL request. This test has been added to source4/selftest/knownfail until the server issue can be investigated and fixed.
I've modified the test code to reflect the error codes that s4 gives. I believe that s4 is in fact giving the correct error codes for these tests, and I've added comments to the torture/smb2/lock.c code explaining my reasoning. Thanks very much for the bug report Steven.