diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-28 22:44:35 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-28 22:44:35 +1000 |
commit | 70eb8d54aec9cb97d8f6675c4dcac2510e1916bb (patch) | |
tree | fe1c00c548bf2a364cbc1dd9ba908b8287175fce /source4 | |
parent | 67226f054b57961ac00b419761014d4a92e8c18d (diff) | |
download | samba-70eb8d54aec9cb97d8f6675c4dcac2510e1916bb.tar.gz samba-70eb8d54aec9cb97d8f6675c4dcac2510e1916bb.tar.bz2 samba-70eb8d54aec9cb97d8f6675c4dcac2510e1916bb.zip |
fixed current_op.mismatch for more cases
(This used to be commit 8a2a31d050a31308036545414f8d180ec8148f1d)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/gentest_smb2.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/torture/gentest_smb2.c b/source4/torture/gentest_smb2.c index e50c4969d5..5a209180e3 100644 --- a/source4/torture/gentest_smb2.c +++ b/source4/torture/gentest_smb2.c @@ -878,7 +878,10 @@ static bool compare_status(NTSTATUS status1, NTSTATUS status2) if (NT_STATUS_EQUAL(status1, status2)) return true; /* one code being an error and the other OK is always an error */ - if (NT_STATUS_IS_OK(status1) || NT_STATUS_IS_OK(status2)) return false; + if (NT_STATUS_IS_OK(status1) || NT_STATUS_IS_OK(status2)) { + current_op.mismatch = nt_errstr(status1); + return false; + } /* if we are ignoring one of the status codes then consider this a match */ if (ignore_pattern(nt_errstr(status1)) || @@ -932,6 +935,7 @@ again: oplocks[i][j].got_break, oplocks[i][j].handle, oplocks[i][j].level); + current_op.mismatch = "oplock break"; return false; } } @@ -976,6 +980,7 @@ again: printf("Notify count inconsistent %d %d\n", notifies[0][j].notify_count, notifies[i][j].notify_count); + current_op.mismatch = "notify count"; return false; } @@ -1003,6 +1008,7 @@ again: printf("Notify action %d inconsistent %d %d\n", n, not1.nttrans.out.changes[n].action, not2.nttrans.out.changes[n].action); + current_op.mismatch = "notify action"; return false; } if (strcmp(not1.nttrans.out.changes[n].name.s, @@ -1010,6 +1016,7 @@ again: printf("Notify name %d inconsistent %s %s\n", n, not1.nttrans.out.changes[n].name.s, not2.nttrans.out.changes[n].name.s); + current_op.mismatch = "notify name"; return false; } if (not1.nttrans.out.changes[n].name.private_length != @@ -1017,6 +1024,7 @@ again: printf("Notify name length %d inconsistent %d %d\n", n, not1.nttrans.out.changes[n].name.private_length, not2.nttrans.out.changes[n].name.private_length); + current_op.mismatch = "notify name length"; return false; } } @@ -1049,6 +1057,7 @@ again: if (!compare_status(status[i], status[0])) { \ printf("status different in %s - %s %s\n", #call, \ nt_errstr(status[0]), nt_errstr(status[i])); \ + current_op.mismatch = nt_errstr(status[0]); \ return false; \ } \ } \ @@ -1114,6 +1123,7 @@ again: #define CHECK_WSTR_EQUAL(field) do { \ if ((!parm[0].field.s && parm[1].field.s) || (parm[0].field.s && !parm[1].field.s)) { \ + current_op.mismatch = #field; \ printf("%s is NULL!\n", #field); \ return false; \ } \ @@ -1852,7 +1862,8 @@ static void backtrack_analyze(struct event_context *ev, if (ret == options.numops) { /* this chunk is needed */ base += chunk; - } else if (strcmp(mismatch, current_op.mismatch)) { + } else if (mismatch != current_op.mismatch && + strcmp(mismatch, current_op.mismatch)) { base += chunk; printf("Different error in backtracking\n"); } else if (ret < base) { |