summaryrefslogtreecommitdiff
path: root/source4/torture/basic
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:torture:basic: eliminate potential for false failures in ↵Michael Adam2014-10-031-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | delayed_write_update1a We want to test that the write did update the write time immediately. We check this by getting the file info in a loop for a few seconds. There are several result cases: - the server updated the write time immediately - success - the server updated the write time, but not immediately - failure - the server did not update the write time - failure The loop is only there to be able to discern between the two failure cases. The check for success is whether the first getinfo has reportet the updated write time. The potential for false failures was the additional timing check. So if the first fileinfo call just took too long (e.g. due to a busy system), this was reported as failure. This patch should eliminate interemittent autobuild failures. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: use assert in the second loop in delayed_write_update1aMichael Adam2014-10-031-11/+10
| | | | | | | We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: add check for size after initial write in ↵Michael Adam2014-10-031-0/+3
| | | | | | | delayed_write_update1a Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: add update into past as error condition in ↵Michael Adam2014-10-031-3/+6
| | | | | | | delayed_write_update1a Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: make use of torture_assert macros in delayed_write_update1aMichael Adam2014-10-031-50/+27
| | | | | | | | | This does not change the logic except for adding early returns in failure cases. But it makes the code more compact and obvious. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: fix spacing in the delayed_write_update1a test.Michael Adam2014-10-031-6/+6
| | | | | | | No diff visible with git diff -w Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: eliminate potential for false failures in ↵Michael Adam2014-10-031-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | delayed_write_update1 We want to test that the write did update the write time immediately. We check this by getting the file info in a loop for a few seconds. There are several result cases: - the server updated the write time immediately - success - the server updated the write time, but not immediately - failure - the server did not update the write time - failure The loop is only there to be able to discern between the two failure cases. The check for success is whether the first getinfo has reportet the updated write time. The potential for false failures was the additional timing check. So if the first fileinfo call just took too long (e.g. due to a busy system), this was reported as failure. This patch should eliminate interemittent autobuild failures. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: use assert in the second loop in delayed_write_update1Michael Adam2014-10-031-11/+10
| | | | | | | We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: add check for size after initial write to ↵Michael Adam2014-10-031-0/+3
| | | | | | | delayed_write_update1 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: add update into past as error condition in ↵Michael Adam2014-10-031-3/+6
| | | | | | | delayed_write_update1 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: make use of torture_assert macros in delayed_write_update1Michael Adam2014-10-031-56/+28
| | | | | | | No logic change except for adding early returns. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: whitespace fix in delayed_write_update1Michael Adam2014-10-031-4/+4
| | | | | | | No diff with git diff -w Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: remove two unused variables from delayed_write_update3cMichael Adam2014-10-031-4/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: use torture_assert macros in delayed_write_updateMichael Adam2014-10-031-31/+22
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:basic: whitespace cleanup in delayed_write_updateMichael Adam2014-10-031-5/+5
| | | | | | | git diff -w shows no diff Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture:base: slightly more generous timing in the defer_open testMichael Adam2014-09-101-1/+1
| | | | | | | | | | | | This copes with cases where the server is very busy and can't provide tortures more tight time scaling.. This is an attepmt to remove the flapping character of this test. Signed-off-by: Michael Adam <obnox@samba.org> Revieed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 10 21:51:42 CEST 2014 on sn-devel-104
* s4:torture:base: add torture_comments to the loop of the deferopen test.Michael Adam2014-09-101-2/+34
| | | | | | | | This is to be able to better tell what went wrong if something went wrong. This is currently one of the main flapping tests. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:base: move i++ down in loop in run_deferopen()Michael Adam2014-09-101-1/+2
| | | | | | | | This is where it belongs, and it prepares subsequent patches. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture: use torture_assert instead of torture_comment and return in ↵Michael Adam2014-08-181-5/+11
| | | | | | | | | | | | defer_open test The fix missed one instance, as autobuild has just told me... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Aug 18 17:42:00 CEST 2014 on sn-devel-104
* s4:torture: use torture_assert instead of torture_comment and return in ↵Michael Adam2014-08-071-4/+5
| | | | | | | defer_open test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: consistently log "pid %u: ..." in the defer_open testMichael Adam2014-08-071-3/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: remove an unused variable and bogus check from the defer_open testMichael Adam2014-08-071-6/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Remove confusing reference to (1 sec == 0.25)Andrew Bartlett2014-06-241-46/+46
| | | | | | | | | | | | | The write should never update the time, so the fraction of the write time delay we use is not important. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 24 01:44:06 CEST 2014 on sn-devel-104
* torture: tidy up whitespace for clarityAndrew Bartlett2014-06-231-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Run base.delaywrite against plugin_s4_dc only, and with kerberos ↵Andrew Bartlett2014-06-231-6/+6
| | | | | | | for faster connections Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture-base.delaywrite: assert the for a delayed write, that it just takes ↵Andrew Bartlett2014-06-231-29/+24
| | | | | | | | | | | | longer than our configured delay This removes the hardcoded TIMEDELAY_SECS that was then made variable by the confusing "secs" variable Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Only error if the write time was updated is less than the expected ↵Andrew Bartlett2014-06-231-19/+19
| | | | | | | | | | | | | | delay The previous test was far, far too tight, it was in seconds 1/4 of the fraction of the normal delay we had configured Samba to use so (1/4) * (500 000 / 2000 000) = 1/16 (sec). This margin appears to just be too tight for our loaded test server. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Store writetimeupdatedelay in a double to allow easier comparisonAndrew Bartlett2014-06-231-16/+16
| | | | | | | | | | In particular, this avoids a comparison with double diff = timeval_elapsed() being promoted to an integer. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: convert torture_comment() -> torture_result() so we can knownfail ↵Andrew Bartlett2014-06-121-34/+34
| | | | | | | | | | | | | flapping base.delaywrite tests This only changes instances directly before a return false, ret = false or goto fail statement. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jun 12 10:39:38 CEST 2014 on sn-devel-104
* torture: convert torture_comment() -> torture_result() so we can knownfail ↵Andrew Bartlett2014-06-121-82/+82
| | | | | | | | | | flapping base.* tests This only changes instances directly before a return false, ret = false or goto fail statement. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture/attr: use security_ace_equal instead of sec_ace_equalDavid Disseldorp2014-05-291-3/+3
| | | | | | | Both offer the same functionality, sec_ace_equal() will be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Remove reduction in time window in delaywrite testAndrew Bartlett2014-04-021-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This causes flakey autobuilds from time to time. The reduction in the time window to 30% was added in: commit c2df97f57ce205935c37cd5a90cfeddb129cd92b Author: Jeremy Allison <jra@samba.org> Date: Thu Nov 5 15:37:26 2009 -0800 Fix up some of the timing constants for DELAYWRITE. Add some extra tests up test_delayed_write_update6 to investigate what happens to a sticky write handle after a second handle close. Jeremy. The original reduction to 75% was set in the new code commit 0d0fddf8ae856efd7ffb07ba8fa32d2f55d3f9c0 Author: Jeremy Allison <jra@samba.org> Date: Fri Sep 5 14:24:36 2008 -0700 Added tests that show that write time update is immediate when changing file size using SMBwrite of size zero, SET_END_OF_FILE, or SET_ALLOCATION_SIZE - no 2 second delay in these cases. Jeremy. (This used to be commit 3aa7523d7750fe30d1e6bb5a75ac42b681b9e493) and in: commit edb3a83a069d39e123f18de098cfaab6deb16729 Author: Stefan Metzmacher <metze@samba.org> Date: Tue Apr 8 10:25:51 2008 +0200 BASE-DELAYWRITE: use timeval_* and make it possible to spefic the writetime update delay metze (This used to be commit 751ab2992afd13548af6e67a03d3ced566cb136f) Change-Id: I8ff9fb8a8b66308f6d784351a0f43b5b234889d1 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbtorture: New torture test for bug #9870.Jeremy Allison2013-12-051-0/+95
| | | | | | | | | | | | | | | Not fetching the latest modification time on a folder if we have read locks on it. Prove we should just rely on the mtime value from the underlying filesystem, even with an open handle. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9870 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Dec 5 10:05:06 CET 2013 on sn-devel-104
* Fix the maxfids test so that it does not fork lots of processes and so that ↵Richard Sharpe2013-02-152-19/+5
| | | | | | | | | | it works for all cases of maxfids. Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 15 07:09:59 CET 2013 on sn-devel-104
* torture: Make sure we use the correct size for cxd.Andreas Schneider2012-12-121-2/+3
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4-torture: Fix some nonemtpy blank linesVolker Lendecke2012-09-251-12/+12
|
* Now SEC_RIGHTS_PRIV_RESTORE and SEC_RIGHTS_PRIV_BACKUP don't include any ↵Jeremy Allison2012-08-311-4/+27
| | | | | | generic bits (they're used directly in the fileserver where the generic bits have already been mapped into file specific bits) we need to add the generic bits to the test when we have these privileges. Mark samba4.base.maximum_allowed knownfail until we implement NTCREATEX_OPTIONS_BACKUP_INTENT.
* s4:torture:basic: add more delete test - variants of deltest16 and deltest17Michael Adam2012-08-171-0/+622
| | | | | | | | | | | | | There seems to be a difference if the initial delete_on_close flag was set on a handle that created the file or if the handle if was for a file that already existed. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Aug 17 21:44:24 CEST 2012 on sn-devel-104
* s4:torture:basic: check the return status of the last open in deltest16Michael Adam2012-08-091-0/+2
| | | | | Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Aug 9 18:01:50 CEST 2012 on sn-devel-104
* s4:torture:basic: fix a message typo in the delete17 testMichael Adam2012-08-091-1/+1
|
* s4:torture:basic: fix abundance of spaces in deltest6Michael Adam2012-08-091-3/+4
|
* s4:torture:basic:delete: fix 4 vs 8 spc tab formatting in ↵Michael Adam2012-08-091-4/+4
| | | | check_delete_on_close()
* s4-torture: Improve torture test boilerplate, use torture_assert()Andrew Bartlett2012-05-183-54/+18
| | | | | | | | | This ensures that if this fails, it is reported as a subunit error correctly. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri May 18 09:35:13 CEST 2012 on sn-devel-104
* s4-torture: Always use torture_assert() to handle failuresAndrew Bartlett2012-05-181-9/+6
|
* s4-selftest: fix output of opened connections in torture_holdconBjörn Baumbach2012-02-161-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s4:libcli/raw: implement on top of smbXcli_conn/reqStefan Metzmacher2011-11-301-5/+21
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104
* s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()Stefan Metzmacher2011-11-301-8/+8
| | | | metze
* s4:torture: use tctx->ev as event context for pollingStefan Metzmacher2011-11-291-1/+1
| | | | metze
* Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison2011-11-214-22/+20
| | | | | | | [-Wunused-but-set-variable]" warnings from the new gcc. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
* libcli: move ioctl function field defs to smb_constantsDavid Disseldorp2011-10-191-1/+1
| | | | | | | Currently there are a lot of duplicate ioctl function field definitions between source3 and source4. Signed-off-by: Stefan Metzmacher <metze@samba.org>