summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-07-11 14:23:30 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-11 16:35:11 +0200
commit50e2785f5e2c870485f8219c97d447b8ea89a1a7 (patch)
treee8393e62928d8dc3751af7404d104e4d7e73ed7d /source3
parente14e6747aed8b5777d4b79ab35fc045f7a0a330f (diff)
downloadsamba-50e2785f5e2c870485f8219c97d447b8ea89a1a7.tar.gz
samba-50e2785f5e2c870485f8219c97d447b8ea89a1a7.tar.bz2
samba-50e2785f5e2c870485f8219c97d447b8ea89a1a7.zip
s3-torture: run_locktest2(): replace check_error() with check_both_error()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/torture.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index ee84afc30b..d40d5aa26c 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -1692,22 +1692,26 @@ static bool run_locktest2(int dummy)
correct = False;
}
- if (NT_STATUS_IS_OK(cli_unlock(cli, fnum1, 0, 4))) {
+ status = cli_unlock(cli, fnum1, 0, 4);
+ if (NT_STATUS_IS_OK(status)) {
printf("unlock1 succeeded! This is a locking bug\n");
- correct = False;
+ correct = false;
} else {
- if (!check_error(__LINE__, cli,
- ERRDOS, ERRlock,
- NT_STATUS_RANGE_NOT_LOCKED)) return False;
+ if (!check_both_error(__LINE__, status, ERRDOS, ERRlock,
+ NT_STATUS_RANGE_NOT_LOCKED)) {
+ return false;
+ }
}
- if (NT_STATUS_IS_OK(cli_unlock(cli, fnum1, 0, 8))) {
+ status = cli_unlock(cli, fnum1, 0, 8);
+ if (NT_STATUS_IS_OK(status)) {
printf("unlock2 succeeded! This is a locking bug\n");
- correct = False;
+ correct = false;
} else {
- if (!check_error(__LINE__, cli,
- ERRDOS, ERRlock,
- NT_STATUS_RANGE_NOT_LOCKED)) return False;
+ if (!check_both_error(__LINE__, status, ERRDOS, ERRlock,
+ NT_STATUS_RANGE_NOT_LOCKED)) {
+ return false;
+ }
}
status = cli_lock32(cli, fnum3, 0, 4, 0, WRITE_LOCK);