s4-torture: skip FSCTL_SRV_ENUM_SNAPS test when not supported
authorDavid Disseldorp <ddiss@suse.de>
Thu, 20 Oct 2011 13:16:59 +0000 (15:16 +0200)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 19 Sep 2012 03:59:03 +0000 (05:59 +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.

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

index 174f2573252ab645233ab2cbd8fb24738587e0ed..e790881e60ef1a6cbd8557addfad1eee2f543a7b 100644 (file)
@@ -99,7 +99,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 c170cb8e528c869f9d2f9868bcca8aa445db2b8e..ae727f04f6616834060c90ef0fd3710697fe970d 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;