mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
torture4: openattr always succeeds
Because this test returned true, it would always succeed, despite failures in the test. Make it return false if there are failures. Also, removed a stray CHECK_MAX_FAILURES introduced by commit 8773e743 that caused the test to *always* fail (but always be ignored). Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): David Mulder <dmulder@samba.org> Autobuild-Date(master): Wed Jun 24 22:13:11 UTC 2020 on sn-devel-184
This commit is contained in:
parent
914ebe666b
commit
fad2bd8ec7
@ -132,12 +132,13 @@ bool torture_openattrtest(struct torture_context *tctx,
|
||||
CHECK_MAX_FAILURES(error_exit);
|
||||
}
|
||||
}
|
||||
torture_assert_ntstatus_equal(tctx,
|
||||
smbcli_nt_error(cli1->tree), NT_STATUS_ACCESS_DENIED,
|
||||
talloc_asprintf(tctx, "[%d] trunc open 0x%x -> 0x%x failed with wrong error code %s",
|
||||
if (!NT_STATUS_EQUAL(smbcli_nt_error(cli1->tree), NT_STATUS_ACCESS_DENIED)) {
|
||||
torture_result(tctx, TORTURE_FAIL,
|
||||
"[%d] trunc open 0x%x -> 0x%x failed with wrong error code %s",
|
||||
k, open_attrs_table[i], open_attrs_table[j],
|
||||
smbcli_errstr(cli1->tree)));
|
||||
smbcli_errstr(cli1->tree));
|
||||
CHECK_MAX_FAILURES(error_exit);
|
||||
}
|
||||
#if 0
|
||||
torture_comment(tctx, "[%d] trunc open 0x%x -> 0x%x failed\n", k, open_attrs_table[i], open_attrs_table[j]);
|
||||
#endif
|
||||
@ -182,6 +183,9 @@ error_exit:
|
||||
smbcli_setatr(cli1->tree, fname, 0, 0);
|
||||
smbcli_unlink(cli1->tree, fname);
|
||||
|
||||
if (failures) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user