diff options
author | Volker Lendecke <vl@samba.org> | 2013-09-05 13:03:56 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-09-05 13:46:14 -0700 |
commit | 778636920b5194b101ce64956ef44c84a785145c (patch) | |
tree | 3795000a1d47b14a64fb5392e9c018cc31ef250b /source4/torture | |
parent | f6afdcd555d240bd614425a144b13678b06e9978 (diff) | |
download | samba-778636920b5194b101ce64956ef44c84a785145c.tar.gz samba-778636920b5194b101ce64956ef44c84a785145c.tar.bz2 samba-778636920b5194b101ce64956ef44c84a785145c.zip |
torture: Adapt raw.oplock to w2k12
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/raw/oplock.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index de3d917fae..ad21623fc9 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -259,6 +259,14 @@ static uint8_t get_break_level1_to_none_count(struct torture_context *tctx) 2 : 1; } +static uint8_t get_setinfo_break_count(struct torture_context *tctx) +{ + if (TARGET_IS_W2K12(tctx)) { + return 2; + } + return 1; +} + static bool test_raw_oplock_exclusive1(struct torture_context *tctx, struct smbcli_state *cli1, struct smbcli_state *cli2) { const char *fname = BASEDIR "\\test_exclusive1.dat"; @@ -477,7 +485,7 @@ static bool test_raw_oplock_exclusive3(struct torture_context *tctx, struct smbc CHECK_STATUS(tctx, status, NT_STATUS_OK); torture_wait_for_oplock_break(tctx); - CHECK_VAL(break_info.count, get_break_level1_to_none_count(tctx)); + CHECK_VAL(break_info.count, get_setinfo_break_count(tctx)); CHECK_VAL(break_info.failures, 0); CHECK_VAL(break_info.level, OPLOCK_BREAK_TO_NONE); @@ -767,7 +775,7 @@ static bool test_raw_oplock_exclusive7(struct torture_context *tctx, torture_wait_for_oplock_break(tctx); CHECK_VAL(break_info.failures, 0); - if (TARGET_IS_WINXP(tctx)) { + if (TARGET_IS_WINXP(tctx) || TARGET_IS_W2K12(tctx)) { /* XP incorrectly breaks to level2. */ CHECK_VAL(break_info.count, 1); CHECK_VAL(break_info.level, OPLOCK_BREAK_TO_LEVEL_II); @@ -800,6 +808,10 @@ static bool test_raw_oplock_exclusive7(struct torture_context *tctx, /* XP already broke to level2. */ CHECK_VAL(break_info.failures, 0); CHECK_VAL(break_info.count, 0); + } else if (TARGET_IS_W2K12(tctx)) { + /* no break */ + CHECK_VAL(break_info.count, 0); + CHECK_VAL(break_info.level, 0); } else { /* Break to level 2 expected. */ CHECK_VAL(break_info.count, 1); @@ -1792,7 +1804,7 @@ static bool test_raw_oplock_batch11(struct torture_context *tctx, struct smbcli_ CHECK_STATUS(tctx, status, NT_STATUS_OK); torture_wait_for_oplock_break(tctx); - CHECK_VAL(break_info.count, get_break_level1_to_none_count(tctx)); + CHECK_VAL(break_info.count, get_setinfo_break_count(tctx)); CHECK_VAL(break_info.failures, 0); CHECK_VAL(break_info.level, 0); @@ -1869,7 +1881,7 @@ static bool test_raw_oplock_batch12(struct torture_context *tctx, struct smbcli_ CHECK_STATUS(tctx, status, NT_STATUS_OK); torture_wait_for_oplock_break(tctx); - CHECK_VAL(break_info.count, get_break_level1_to_none_count(tctx)); + CHECK_VAL(break_info.count, get_setinfo_break_count(tctx)); CHECK_VAL(break_info.failures, 0); CHECK_VAL(break_info.level, 0); @@ -2397,7 +2409,7 @@ static bool test_raw_oplock_batch19(struct torture_context *tctx, struct smbcli_ CHECK_VAL(break_info.failures, 0); - if (TARGET_IS_WINXP(tctx)) { + if (TARGET_IS_WINXP(tctx) || TARGET_IS_W2K12(tctx)) { /* Win XP breaks to level2. */ CHECK_VAL(break_info.count, 1); CHECK_VAL(break_info.level, OPLOCK_BREAK_TO_LEVEL_II); @@ -2759,7 +2771,7 @@ static bool test_raw_oplock_batch20(struct torture_context *tctx, struct smbcli_ torture_wait_for_oplock_break(tctx); CHECK_VAL(break_info.failures, 0); - if (TARGET_IS_WINXP(tctx)) { + if (TARGET_IS_WINXP(tctx) || TARGET_IS_W2K12(tctx)) { /* Win XP breaks to level2. */ CHECK_VAL(break_info.count, 1); CHECK_VAL(break_info.level, OPLOCK_BREAK_TO_LEVEL_II); |