From 1f5aec877fc48ff96b14a0e95f01c68a29dd8718 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 15 Jul 2009 11:49:33 -0700 Subject: Make cli_unlock and cli_unlock64 async. Fix POSIX lock test. Jeremy. --- source3/torture/torture.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'source3/torture/torture.c') diff --git a/source3/torture/torture.c b/source3/torture/torture.c index e3c4084e0c..f9192b12b7 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -492,7 +492,7 @@ static bool rw_torture(struct cli_state *c) correct = False; } - if (!cli_unlock(c, fnum2, n*sizeof(int), sizeof(int))) { + if (!NT_STATUS_IS_OK(cli_unlock(c, fnum2, n*sizeof(int), sizeof(int)))) { printf("unlock failed (%s)\n", cli_errstr(c)); correct = False; } @@ -1429,12 +1429,12 @@ static bool run_locktest2(int dummy) printf("lock at 100 failed (%s)\n", cli_errstr(cli)); } cli_setpid(cli, 2); - if (cli_unlock(cli, fnum1, 100, 4)) { + if (NT_STATUS_IS_OK(cli_unlock(cli, fnum1, 100, 4))) { printf("unlock at 100 succeeded! This is a locking bug\n"); correct = False; } - if (cli_unlock(cli, fnum1, 0, 4)) { + if (NT_STATUS_IS_OK(cli_unlock(cli, fnum1, 0, 4))) { printf("unlock1 succeeded! This is a locking bug\n"); correct = False; } else { @@ -1443,7 +1443,7 @@ static bool run_locktest2(int dummy) NT_STATUS_RANGE_NOT_LOCKED)) return False; } - if (cli_unlock(cli, fnum1, 0, 8)) { + if (NT_STATUS_IS_OK(cli_unlock(cli, fnum1, 0, 8))) { printf("unlock2 succeeded! This is a locking bug\n"); correct = False; } else { @@ -1565,14 +1565,14 @@ static bool run_locktest3(int dummy) for (offset=i=0;i