s4 torture: Add lockread_supported based off of CAP_LOCK_AND_READ
[sfrench/samba-autobuild/.git] / source4 / torture / raw / read.c
index 90ca18d5b62bcedb0dd0d42218a51f292371bd44..efdd04045196a05d0d174f0329f9b0d5c4646bd7 100644 (file)
@@ -224,6 +224,11 @@ static bool test_lockread(struct torture_context *tctx,
        const char *test_data = "TEST DATA";
        uint_t seed = time(NULL);
 
+       if (!cli->transport->negotiate.lockread_supported) {
+               printf("Server does not support lockread - skipping\n");
+               return true;
+       }
+
        buf = talloc_zero_array(tctx, uint8_t, maxsize);
 
        if (!torture_setup_dir(cli, BASEDIR)) {