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";
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);
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);
/* 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);
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);
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);
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);
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);