RPC-WKSSVC has tests that test functions that don't and aren't supposed to run on a DC (those functions immediately return WERR_SETUP_DOMAIN_CONTROLLER, causing the test to fail). Those tests are: wkssvc.NetrUnjoinDomain2 wkssvc.NetrJoinDomain2 wkssvc.NetrRenameMachineInDomain2 wkssvc.NetrSetPrimaryComputerName wkssvc.NetrAddAlternateComputerName wkssvc.NetrRemoveAlternateComputerName The rest of the tests in this suite can be run on a DC, and should as DCs still run the Workstation service. The above listed tests should be removed from the RPC-WKSSVC suite and added to a new RPC-WKSSVC-NO-DC test suite. This will enable the new RPC-WKSSVC suite to test the Workstation service on all Windows hosts, including DCs and will enable the suite to pass against them all. Naming the new suite RPC-WKSSVC-NO-DC should indicate that its not supposed to be run against a DC, so that if it somehow is(in which case it will fail), the name will remind the tester that its not supposed to have been run against a DC(thus the failure doesn't indicate anything is broken on either end). Also, it would be preferable if smbtorture could be told the role of the target host its running against (if its a DC or workstation, etc...) and then automatically run RPC-WKSSVC-NO-DC or not, when the target is not a DC or is a DC. These changes will improve smbtorture's accuracy when testing a Samba client and Samba and Windows DCs and regardless of what the client or server is, will provide a better indicator of problems on the client or server side of the Workstation service.
Thanks for the suggestion. I don't think it's quite correct to split up the test, but a sensible option would be to detect that we are on a DC, and cope with these errors, and to *enforce* getting such errors from a DC (once we know it's a DC). That would give us a good test against all configurations.