torture: skip FSCTL_SRV_ENUM_SNAPS test when not supported
authorDavid Disseldorp <ddiss@suse.de>
Tue, 15 Jan 2013 16:23:03 +0000 (17:23 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Mon, 15 Apr 2013 16:15:14 +0000 (18:15 +0200)
If FSCTL_SRV_ENUM_SNAPS fails with NT_STATUS_NOT_SUPPORTED then skip the
test, this means we can run the full ioctl test suite as part of
autobuild.

Reviewed by: Jeremy Allison <jra@samba.org>

(cherry picked from commit 3619b1a7b2b5a2bfe6fdb13ecb4650ae575ab3e8)

selftest/skip
source4/torture/smb2/ioctl.c

index 48d9ba6ff8cee32aab7043cd05fc9511852acab9..50a6e0cd897e87ec1d815a9664a35e6a005f3455 100644 (file)
@@ -102,7 +102,6 @@ bench # don't run benchmarks in our selftest
 # we should build a samba4ktutil and use that instead
 ^samba4.blackbox.ktpass # this test isn't portable ...
 ^samba4.drs.repl_schema.python # flakey test
-^samba4.smb2.ioctl # snapshots not supported by default
 ^samba4.drs.delete_object.python # flakey test
 ^samba4.rpc.unixinfo # This contains a server-side getpwuid call which hangs the server when nss_winbindd is in use
 ^samba.tests.dcerpc.unix  # This contains a server-side getpwuid call which hangs the server when nss_winbindd is in use
index fdca6018361fb48025fd4eed9038b95dcf61255b..8c949ef3009e763fdd10930a18d458bbf972cd30 100644 (file)
@@ -59,6 +59,12 @@ static bool test_ioctl_get_shadow_copy(struct torture_context *torture,
        ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
 
        status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
+       if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)
+        || NT_STATUS_EQUAL(status, NT_STATUS_INVALID_DEVICE_REQUEST)) {
+               torture_comment(torture,
+                       "FSCTL_SRV_ENUM_SNAPS not supported, skipping\n");
+               return true;
+       }
        torture_assert_ntstatus_ok(torture, status, "FSCTL_SRV_ENUM_SNAPS");
 
        return true;