1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

60 Commits

Author SHA1 Message Date
Andrew Bartlett
f3f2b52f9f torture: tidy up whitespace for clarity
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-23 23:30:14 +02:00
Andrew Bartlett
00a83effc1 selftest: Run base.delaywrite against plugin_s4_dc only, and with kerberos for faster connections
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-23 23:30:14 +02:00
Andrew Bartlett
0e224698f7 torture-base.delaywrite: assert the for a delayed write, that it just takes 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>
2014-06-23 23:30:14 +02:00
Andrew Bartlett
f407f58fd3 torture: Only error if the write time was updated is less than the expected 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>
2014-06-23 23:30:14 +02:00
Andrew Bartlett
24a73bb526 torture: Store writetimeupdatedelay in a double to allow easier comparison
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>
2014-06-23 23:30:14 +02:00
Andrew Bartlett
37e7b5a1b0 torture: convert torture_comment() -> torture_result() so we can knownfail 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
2014-06-12 10:39:38 +02:00
Andrew Bartlett
1bdc635f1d selftest: Remove reduction in time window in delaywrite test
This causes flakey autobuilds from time to time.

The reduction in the time window to 30% was added in:

commit c2df97f57c
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 0d0fddf8ae
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 3aa7523d77)

and in:

commit edb3a83a06
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 751ab2992a)

Change-Id: I8ff9fb8a8b66308f6d784351a0f43b5b234889d1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-02 00:31:48 +02:00
Jeremy Allison
48f426b22d smbtorture: New torture test for bug #9870.
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
2013-12-05 10:05:06 +01:00
Volker Lendecke
f01013b1a4 s4-torture: Fix some nonemtpy blank lines 2012-09-25 07:22:43 -07:00
Andrew Bartlett
45082a88c7 s4-torture: Improve torture test boilerplate, use torture_assert()
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
2012-05-18 09:35:13 +02:00
Jeremy Allison
3e6e1aed94 Fix a bunch of "warning: variable ‘XXXX’ set but not used [-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
2011-11-21 23:39:08 +01:00
Jelmer Vernooij
be9f1ca1c6 source4/torture/basic: Fix prototypes for all functions. 2011-03-19 03:20:04 +01:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
Björn Jacke
2b254c814b s3/s4: merge msleep and smb_msleep
the merged variant is renamed to smb_msleep as some platforms already have a
msleep function.
2010-09-16 21:38:20 +02:00
Jeremy Allison
c2df97f57c 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.
2009-11-05 15:37:26 -08:00
Jeremy Allison
f3cc05b96d Torture test for bug 6529 - Offline files conflict with Vista and Office 2003.
Ensure we don't regress.
Jeremy.
2009-09-14 18:45:16 -07:00
Jeremy Allison
9a86f26a5f Allow systems with timestamp granularity of 1sec to work with
this test.
Jeremy.
2009-08-24 18:21:23 -07:00
Jeremy Allison
0daf9a042c Note that the delaytime for update has changed betweek w2k3 and w2k8.
We must eventually parameterize this.
Jeremy.
2009-06-03 14:12:18 -07:00
Jelmer Vernooij
a61c9ded40 Properly report why a test didn't succeed (required for use with known
failures).
2008-09-18 16:05:46 +02:00
Jeremy Allison
6ce1c893fa Comment the delay write time tests so I know what they're
testing.
Jeremy.
(This used to be commit 2bf9074c77)
2008-09-12 14:59:32 -07:00
Jeremy Allison
bc731db854 A truncate write must be a smbcli_smbwrite, not a
smbcli_write.
Jeremy.
(This used to be commit 8cebd4d36c)
2008-09-09 21:24:34 -07:00
Jeremy Allison
2c2a79eefa Make it easier to see when tests start/end.
Jeremy.
(This used to be commit 6f89e72827)
2008-09-08 14:58:58 -07:00
Stefan Metzmacher
ad34034797 BASE-DELAYWRITE: test behavior of SMBwrite truncate, writeX, SMBwrite truncate and writeX again
metze
(This used to be commit 66b8c8d80e)
2008-09-08 16:22:57 +02:00
Stefan Metzmacher
f009e78864 BASE-DELAYWRITE: test behavior of writeX, SMBwrite truncate, writeX and SMBwrite again
metze
(This used to be commit 051164ba0a)
2008-09-08 16:22:57 +02:00
Stefan Metzmacher
1cf9d7e078 BASE-DELAYWRITE: demonstrate that a truncate write doesn't update the write time after SET_FILE_INFO
metze
(This used to be commit f81014db9d)
2008-09-08 16:22:53 +02:00
Stefan Metzmacher
a626b01193 BASE-DELAYWRITE: demonstrate that the time between the open and the first write doesn't matter
metze
(This used to be commit 13d051cd63)
2008-09-08 12:12:25 +02:00
Stefan Metzmacher
3ca48b015f BASE-DELAYWRITE: test more details of the truncate write time update behavior
metze
(This used to be commit 39367ef15f)
2008-09-08 08:31:34 +02:00
Jeremy Allison
56b6b4a68f Don't compare identity, it'll never be different.
Jeremy.
(This used to be commit 840369b553)
2008-09-05 21:47:06 -07:00
Jeremy Allison
0d0fddf8ae 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 3aa7523d77)
2008-09-05 14:24:36 -07:00
Andrew Tridgell
70219bee13 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 9d74201e46)
2008-06-03 15:11:42 -07:00
Stefan Metzmacher
6610a6c49a BASE-DELAYWRITE: fix test on filesystem without high resolution timestamps
metze
(This used to be commit fde9880f99)
2008-06-03 14:03:49 +02:00
Stefan Metzmacher
fb4c9dd5eb BASE-DELAYWRITE: add missing time checks to make sure the server has updated the write time
metze
(This used to be commit 9c004df891)
2008-06-03 11:17:17 +02:00
Andrew Tridgell
e7b30f023b remove unused macros
(This used to be commit 7a1877db15)
2008-06-02 11:04:36 +10:00
Stefan Metzmacher
4677ac6e70 BASE-DELAYWRITE: be more friendly to filesystems without high resolution timestamps
metze
(This used to be commit 9c18cf6708)
2008-04-08 19:42:06 +02:00
Stefan Metzmacher
edb3a83a06 BASE-DELAYWRITE: use timeval_* and make it possible to spefic the writetime update delay
metze
(This used to be commit 751ab2992a)
2008-04-08 16:55:16 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Stefan Metzmacher
1fbe268ec9 r26307: BASE-DELAYWRITE: only set the write time
metze
(This used to be commit b7d7a58b23)
2007-12-21 05:48:19 +01:00
Stefan Metzmacher
8036dbcf7f r26306: BASE-DELAYWRITE: print access time stamps and test fileinfo and pathinfo match
metze
(This used to be commit 58bc21a3f8)
2007-12-21 05:48:19 +01:00
Stefan Metzmacher
4ab0b47ffd r26220: BASE-DELAYWRITE: add more subtests to explore write time update details
metze
(This used to be commit 92dcc85e3a)
2007-12-21 05:46:57 +01:00
Stefan Metzmacher
c555c3fa38 r26219: BASE-DELAYWRITE: make the tests more strict about the write time update
metze
(This used to be commit c1335651d3)
2007-12-21 05:46:57 +01:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Jelmer Vernooij
72d88d158a r21707: Finally merge my (long-living) perlselftest branch.
This changes the main selftest code to be in perl rather than in shell script.

The selftest script is now no longer a black box but a regular executable that takes
--help.

This adds the following features:

 * "make test TESTS=foo" will run only the tests that match the regex "foo"
 * ability to deal with expected failures. the suite will not warn about tests
   that fail and are known to fail, but will warn about other failing tests and
   tests that are succeeding tests but incorrectly marked as failing.
 * ability to print a summary with all failures at the end of the run

It also opens up the way to the following features, which I hope to implement later:
 * "environments", for example having a complete domains with DCs and domain members
 in a testenvironment
 * only set up smbd if necessary (not when running LOCAL tests, for example)
 * different mktestsetup scripts per target. except for the mktestsetup script, we can
   use the same infrastructure for samba 3 or windows.
(This used to be commit 38f867880b)
2007-10-10 14:49:15 -05:00
Jelmer Vernooij
8773e743c5 r19339: Merge my 4.0-unittest branch. This adds an API for more fine-grained
output in the testsuite rather than just True or False for a
set of tests.

The aim is to use this for:
 * known failure lists (run all tests and detect tests that
						started working or started failing). This
   would allow us to get rid of the RPC-SAMBA3-* tests
 * nicer torture output
 * simplification of the testsuite system
 * compatibility with other unit testing systems
 * easier usage of smbtorture (being able to run one test
						and automatically set up the environment for that)

This is still a work-in-progress; expect more updates over the next couple of
days.
(This used to be commit 0eb6097305)
2007-10-10 14:21:12 -05:00
Volker Lendecke
b7c5bc522b r16907: Add an index parameter to torture_open_connection. Next step is to enable the
unclist parameter for all tests that do two connections, to enable cluster
testing.

Volker
(This used to be commit a5d6db0924)
2007-10-10 14:09:58 -05:00
Stefan Metzmacher
7f0e17e903 r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level
metze
(This used to be commit 95bf41b4d4)
2007-10-10 14:08:09 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce291)
2007-10-10 13:59:13 -05:00
Jelmer Vernooij
d09b70c98b r14527: Fix build problems.
(This used to be commit 863ca4014d)
2007-10-10 13:57:37 -05:00
Stefan Metzmacher
a1b295ed48 r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo

metze
(This used to be commit be6d5298a2)
2007-10-10 13:57:06 -05:00
Stefan Metzmacher
307e43bb56 r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f59709)
2007-10-10 13:56:57 -05:00