From f26a500d9ff854734decdcb196136dc8cc19eb4a Mon Sep 17 00:00:00 2001 From: Zachary Loafman Date: Tue, 17 Nov 2009 23:25:58 +0000 Subject: s4 torture: Add lockread_supported based off of CAP_LOCK_AND_READ Signed-off-by: Tim Prouty --- source4/torture/raw/read.c | 5 +++++ source4/torture/raw/write.c | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'source4/torture/raw') diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index 90ca18d5b6..efdd040451 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -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)) { diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c index cd1b078dbf..31cbb98a88 100644 --- a/source4/torture/raw/write.c +++ b/source4/torture/raw/write.c @@ -425,6 +425,11 @@ static bool test_writeunlock(struct torture_context *tctx, buf = talloc_zero_array(tctx, uint8_t, maxsize); + if (!cli->transport->negotiate.lockread_supported) { + printf("Server does not support writeunlock - skipping\n"); + return true; + } + if (!torture_setup_dir(cli, BASEDIR)) { return false; } -- cgit