obnox/samba/samba-obnox.git
9 years agoFurther reduce the no-op build times (by 35% compared the original) master-torture
Thomas Nagy [Fri, 3 Oct 2014 19:01:57 +0000 (21:01 +0200)]
Further reduce the no-op build times (by 35% compared the original)

9 years agoRevert "Revert "Reduce the no-op build times by 30%""
Michael Adam [Mon, 6 Oct 2014 14:22:25 +0000 (16:22 +0200)]
Revert "Revert "Reduce the no-op build times by 30%""

This reverts commit cbb30d993e3aab6a294f90d4f64714d988423363.

9 years agoRevert "Reduce the no-op build times by 35%"
Michael Adam [Mon, 6 Oct 2014 14:22:21 +0000 (16:22 +0200)]
Revert "Reduce the no-op build times by 35%"

This reverts commit 81580e6bc7d17d1b31fca873924c49117ed7db80.

9 years agoReduce the no-op build times by 35%
Thomas Nagy [Sat, 27 Sep 2014 12:29:40 +0000 (14:29 +0200)]
Reduce the no-op build times by 35%

9 years agoRevert "Reduce the no-op build times by 30%"
Michael Adam [Fri, 3 Oct 2014 19:01:57 +0000 (21:01 +0200)]
Revert "Reduce the no-op build times by 30%"

This reverts commit 1c5ef289a872cf0dc78b2e9dd35b20fa99db86fb.

9 years agoTODO: script: add test-loop.sh: loop over make test TESTS=<pat> until failure occurs
Michael Adam [Wed, 20 Aug 2014 16:47:34 +0000 (18:47 +0200)]
TODO: script: add test-loop.sh: loop over make test TESTS=<pat> until failure occurs

call:

TESTS="pattern" ./test-loop.sh

9 years agoTODO: test_delayed_write_update3
Michael Adam [Sat, 4 Oct 2014 19:38:22 +0000 (21:38 +0200)]
TODO: test_delayed_write_update3

9 years agos4:torture:basic: use torture_assert macros in some helper macros
Michael Adam [Sat, 4 Oct 2014 18:58:17 +0000 (20:58 +0200)]
s4:torture:basic: use torture_assert macros in some helper macros

No change in behaviour.

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos4:torture:basic: use torture_assert macros in finfo_after_write test
Michael Adam [Sat, 4 Oct 2014 18:14:43 +0000 (20:14 +0200)]
s4:torture:basic: use torture_assert macros in finfo_after_write test

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agoTODO(SQ?) s4:torture:basic: use assert in delayed_write_update2
Michael Adam [Sun, 5 Oct 2014 22:33:30 +0000 (00:33 +0200)]
TODO(SQ?) s4:torture:basic: use assert in delayed_write_update2

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos4:torture:basic: use torture_assert macros in delayed_write_update2
Michael Adam [Sat, 4 Oct 2014 16:15:27 +0000 (18:15 +0200)]
s4:torture:basic: use torture_assert macros in delayed_write_update2

This does not introduce a behaviour change except for
early returns.
There is no point in continuing when something already
failed.

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos4:torture:basic: whitespace cleanup in delayed_write_update2
Michael Adam [Fri, 3 Oct 2014 21:44:25 +0000 (23:44 +0200)]
s4:torture:basic: whitespace cleanup in delayed_write_update2

No diff seen with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agoTODO: also run the delaywrite against the s3dc environment again
Michael Adam [Thu, 2 Oct 2014 12:29:36 +0000 (14:29 +0200)]
TODO: also run the delaywrite against the s3dc environment again

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agoTMP: start proper timers for torture tests...
Michael Adam [Wed, 10 Sep 2014 11:39:38 +0000 (13:39 +0200)]
TMP: start proper timers for torture tests...

9 years agos4:torture:base: be even more generous in the defer_open test
Michael Adam [Thu, 11 Sep 2014 16:08:10 +0000 (18:08 +0200)]
s4:torture:base: be even more generous in the defer_open test

After 1600 consecutive runs, the test failed for me again on
a busy server with elapsed time 1.82s. setting the absolute
generosity to 2 gives us room up to 2.15. That should hopefully
suffice.

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agowindbindd: Make cm_connect_lsa_tcp static
Christof Schmitt [Fri, 3 Oct 2014 17:36:02 +0000 (10:36 -0700)]
windbindd: Make cm_connect_lsa_tcp static

It is only used in winbindd_cm.c

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Oct  4 02:34:49 CEST 2014 on sn-devel-104

9 years agosmbd: Always use uint8_t for inbuf pointer
Christof Schmitt [Tue, 2 Sep 2014 19:24:29 +0000 (12:24 -0700)]
smbd: Always use uint8_t for inbuf pointer

This avoids some casts from char pointers.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agosmbd: Pass only cmd to construct_reply_common instead of complete req
Christof Schmitt [Tue, 2 Sep 2014 19:18:30 +0000 (12:18 -0700)]
smbd: Pass only cmd to construct_reply_common instead of complete req

construct_reply_common only needs the commands code and the inbuf field,
not the complete request.

Signed-off-by: Christof Schmitt <cs@samba.org>
9 years agosmbd: Use MIN macro in fake_sendfile
Christof Schmitt [Mon, 11 Aug 2014 20:19:46 +0000 (13:19 -0700)]
smbd: Use MIN macro in fake_sendfile

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3-winbindd: Make wcache_sid_to_name static
Christof Schmitt [Sat, 30 Aug 2014 01:05:43 +0000 (18:05 -0700)]
s3-winbindd: Make wcache_sid_to_name static

It is only used in winbindd_cache.c

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3-winbindd: Remove extern declaration for cache_methods from winbindd_dual.c
Christof Schmitt [Sat, 30 Aug 2014 01:04:27 +0000 (18:04 -0700)]
s3-winbindd: Remove extern declaration for cache_methods from winbindd_dual.c

cache_methods is not used in winbindd_dual.c

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Use charset_compat.h if SAMBA_UTIL_CORE_ONLY
Martin Schwenke [Mon, 22 Sep 2014 10:26:24 +0000 (20:26 +1000)]
lib/util: Use charset_compat.h if SAMBA_UTIL_CORE_ONLY

When doing a CTDB standalone build we don't want to use dynconfig,
since this introduces a lot of unwanted complexity.  To avoid this,
either:

* charset needs to be nobbled to avoid loading the case tables, since
  this depends on dynconfig; or

* charset needs to be avoid completely, so some functions need to be
  replaced with their ASCII counterparts.

The 2nd options seems more honest and less error-prone.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Factor out subsystem samba-util-core from samba-util
Martin Schwenke [Fri, 15 Aug 2014 06:00:32 +0000 (16:00 +1000)]
lib/util: Factor out subsystem samba-util-core from samba-util

samba-util depends on Samba-specific code.  Exclude this code from
samba-util-core.  When told to, via SAMBA_UTIL_CORE_ONLY, only build
samba-util-core and dependencies.  When SAMBA_UTIL_CORE_ONLY is not
defined then the behaviour should be unchanged.

Standalone builds of CTDB will be done against samba-util-core to
avoid pulling in Samba-specific code.

An alternative would be to remove the Samba-dependent code from
samba-util.  However, some of it is used by OpenChange.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for util.c
Martin Schwenke [Mon, 22 Sep 2014 08:28:53 +0000 (18:28 +1000)]
lib/util: Clean up includes for util.c

Allows standalone compiles without external includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for fault.c
Martin Schwenke [Mon, 22 Sep 2014 09:43:27 +0000 (19:43 +1000)]
lib/util: Clean up includes for fault.c

Add fault.h.  Allows standalone compiles without external includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for substitute.c
Martin Schwenke [Mon, 22 Sep 2014 10:38:52 +0000 (20:38 +1000)]
lib/util: Clean up includes for substitute.c

Add substitute.h.  Allows standalone compiles without external
includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Replace an SMB_ASSERT()
Martin Schwenke [Tue, 23 Sep 2014 18:41:25 +0000 (04:41 +1000)]
lib/util: Replace an SMB_ASSERT()

Avoid a cyclic dependency.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for signal.c
Martin Schwenke [Mon, 22 Sep 2014 09:57:52 +0000 (19:57 +1000)]
lib/util: Clean up includes for signal.c

Add signal.h.  Allows standalone compiles without external includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for time.[ch]
Martin Schwenke [Mon, 22 Sep 2014 09:38:18 +0000 (19:38 +1000)]
lib/util: Clean up includes for time.[ch]

Allows standalone compile without external includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for data_blob.[ch]
Martin Schwenke [Mon, 22 Sep 2014 09:31:23 +0000 (19:31 +1000)]
lib/util: Clean up includes for data_blob.[ch]

Allows standalone compile without external includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for xfile.[ch]
Martin Schwenke [Mon, 22 Sep 2014 09:21:42 +0000 (19:21 +1000)]
lib/util: Clean up includes for xfile.[ch]

The include files added to xfile.h are already included
unconditionally elsewhere (replace.h, samba_util.h, ...) so Samba
can't be built without them.

To minimise dependencies, only include specific util headers instead
of samba_util.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: Clean up includes for blocking.c
Martin Schwenke [Mon, 22 Sep 2014 08:14:53 +0000 (18:14 +1000)]
lib/util: Clean up includes for blocking.c

Add blocking.h.  Allows standalone compile without external
includes.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Make WITH_PROFILE span more in smbprofile.h
Volker Lendecke [Thu, 2 Oct 2014 13:45:01 +0000 (13:45 +0000)]
profiling: Make WITH_PROFILE span more in smbprofile.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct  3 22:17:46 CEST 2014 on sn-devel-104

9 years agoprofiling: Remove a big DEBUG statement
Volker Lendecke [Thu, 2 Oct 2014 13:40:35 +0000 (13:40 +0000)]
profiling: Remove a big DEBUG statement

I would like to have the freedom to play with the profiling implementation.
This is kindof in the way.

This code is from pre-SVN days:

> commit 7914e9351abb5271ebb4990c3b1fe495d15a4eda
> Author:     Jeremy Allison <jra@samba.org>
> AuthorDate: Thu Oct 5 18:50:18 2000 +0000
> Commit:     Jeremy Allison <jra@samba.org>
> CommitDate: Thu Oct 5 18:50:18 2000 +0000
>
>     Herb's fixes for profiling & compiler warnings.
>     Jeremy.

Herb, please speak up quickly if you still need this :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Remove some #ifdefs
Volker Lendecke [Thu, 2 Oct 2014 13:36:22 +0000 (13:36 +0000)]
profiling: Remove some #ifdefs

The DO_PROFILE_INC thingies already #define to nothing without
WITH_PROFILE, and any sane compiler will just not compile the if-condition
if there is no body to be executed.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Only compile profile/profile.c if profiling is enabled
Volker Lendecke [Tue, 30 Sep 2014 15:08:20 +0000 (15:08 +0000)]
profiling: Only compile profile/profile.c if profiling is enabled

This conditional compile avoids some #ifdef WITH_PROFILE, which makes the code
more readable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Only compile utils/status_profile.c if profiling is enabled
Volker Lendecke [Tue, 30 Sep 2014 15:08:20 +0000 (15:08 +0000)]
profiling: Only compile utils/status_profile.c if profiling is enabled

This conditional compile avoids some #ifdef WITH_PROFILE, which makes the code
more readable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Fix a typo
Volker Lendecke [Thu, 2 Oct 2014 13:05:07 +0000 (13:05 +0000)]
profiling: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Move some #defines to profile.c
Volker Lendecke [Thu, 2 Oct 2014 12:52:05 +0000 (12:52 +0000)]
profiling: Move some #defines to profile.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Fix a typo
Volker Lendecke [Tue, 30 Sep 2014 13:06:02 +0000 (13:06 +0000)]
profiling: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprofiling: Make "struct profile_header" static
Volker Lendecke [Mon, 29 Sep 2014 15:06:37 +0000 (15:06 +0000)]
profiling: Make "struct profile_header" static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agowinbind3: Fix pwent variable substitution
Justin Maggard [Fri, 3 Oct 2014 00:21:06 +0000 (17:21 -0700)]
winbind3: Fix pwent variable substitution

Commit 0ce46318 (winbind3: Simplify fillup_pw_field) broke variable
substitution by copying from the wrong (unsubstituted) buffer.  Fix it.

Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
9 years agoReduce the no-op build times by 30%
Thomas Nagy [Fri, 26 Sep 2014 21:46:01 +0000 (23:46 +0200)]
Reduce the no-op build times by 30%

Change-Id: Ie68436c1e7c75c1786e9ed6b6a54d2b55abbbcea
Reviewed-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Oct  3 13:25:18 CEST 2014 on sn-devel-104

9 years agowaf: add k5crypto to the list of system libraries if they are reported by the krb5con...
Matthieu Patou [Wed, 14 May 2014 23:38:08 +0000 (16:38 -0700)]
waf: add k5crypto to the list of system libraries if they are reported by the krb5config but not found as requied by the different tests

Otherwise on some systems we have error message like
"Implied dependency k5crypto in winbind_krb5_locator is of type EMPTY"
Even though krb5config indicated that this library is needed and the
library is present

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolibrpc: simplify ndr_pull_dnsp_string
Matthieu Patou [Mon, 14 Oct 2013 04:39:51 +0000 (21:39 -0700)]
librpc: simplify ndr_pull_dnsp_string

total_len is 1 and never varies.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoFix typo in samba-tool manpage
Андрей Черепанов [Thu, 2 Oct 2014 15:23:09 +0000 (19:23 +0400)]
Fix typo in samba-tool manpage

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct  3 11:00:58 CEST 2014 on sn-devel-104

9 years agos4:torture:basic: eliminate potential for false failures in delayed_write_update1c
Michael Adam [Thu, 2 Oct 2014 15:15:04 +0000 (17:15 +0200)]
s4:torture:basic: eliminate potential for false failures in delayed_write_update1c

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>
9 years agos4:torture:basic: use assert in the second loop in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 15:13:21 +0000 (17:13 +0200)]
s4:torture:basic: use assert in the second loop in delayed_write_update1b

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>
9 years agos4:torture:basic: add check for size after initial write in delayed_write_update1c
Michael Adam [Thu, 2 Oct 2014 15:10:32 +0000 (17:10 +0200)]
s4:torture:basic: add check for size after initial write in delayed_write_update1c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: add update into past as error condition in delayed_write_update1c
Michael Adam [Thu, 2 Oct 2014 15:09:18 +0000 (17:09 +0200)]
s4:torture:basic: add update into past as error condition in delayed_write_update1c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: make use of torture_assert macros in delayed_write_update1c
Michael Adam [Thu, 2 Oct 2014 15:08:12 +0000 (17:08 +0200)]
s4:torture:basic: make use of torture_assert macros in delayed_write_update1c

This does not change the logic except for adding early
returns in failure cases.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: whitespace cleanup in delayed_write_update1c
Michael Adam [Thu, 2 Oct 2014 15:02:38 +0000 (17:02 +0200)]
s4:torture:basic: whitespace cleanup in delayed_write_update1c

no diff with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: eliminate potential for false failures in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 14:48:40 +0000 (16:48 +0200)]
s4:torture:basic: eliminate potential for false failures in delayed_write_update1b

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>
9 years agos4:torture:basic: use assert in the second loop in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 14:46:18 +0000 (16:46 +0200)]
s4:torture:basic: use assert in the second loop in delayed_write_update1b

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>
9 years agos4:torture:basic: add check for size after initial write in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 14:53:26 +0000 (16:53 +0200)]
s4:torture:basic: add check for size after initial write in delayed_write_update1b

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: add update into past as error condition in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 14:44:34 +0000 (16:44 +0200)]
s4:torture:basic: add update into past as error condition in delayed_write_update1b

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: make use of torture_assert macros in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 14:40:26 +0000 (16:40 +0200)]
s4:torture:basic: make use of torture_assert macros in delayed_write_update1b

This does not change the logic except for adding early
returns in failure cases.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: whitespace cleanup in delayed_write_update1b
Michael Adam [Thu, 2 Oct 2014 14:34:19 +0000 (16:34 +0200)]
s4:torture:basic: whitespace cleanup in delayed_write_update1b

no diff with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: eliminate potential for false failures in delayed_write_update1a
Michael Adam [Thu, 2 Oct 2014 11:56:43 +0000 (13:56 +0200)]
s4:torture:basic: eliminate potential for false failures in 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>
9 years agos4:torture:basic: use assert in the second loop in delayed_write_update1a
Michael Adam [Thu, 2 Oct 2014 11:46:29 +0000 (13:46 +0200)]
s4:torture:basic: use assert in the second loop in delayed_write_update1a

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>
9 years agos4:torture:basic: add check for size after initial write in delayed_write_update1a
Michael Adam [Thu, 2 Oct 2014 14:33:13 +0000 (16:33 +0200)]
s4:torture:basic: add check for size after initial write in delayed_write_update1a

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: add update into past as error condition in delayed_write_update1a
Michael Adam [Thu, 2 Oct 2014 13:49:07 +0000 (15:49 +0200)]
s4:torture:basic: add update into past as error condition in delayed_write_update1a

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: make use of torture_assert macros in delayed_write_update1a
Michael Adam [Thu, 2 Oct 2014 11:37:02 +0000 (13:37 +0200)]
s4:torture:basic: make use of torture_assert macros in delayed_write_update1a

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>
9 years agos4:torture:basic: fix spacing in the delayed_write_update1a test.
Michael Adam [Thu, 2 Oct 2014 11:32:59 +0000 (13:32 +0200)]
s4:torture:basic: fix spacing in the delayed_write_update1a test.

No diff visible with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: eliminate potential for false failures in delayed_write_update1
Michael Adam [Thu, 2 Oct 2014 14:11:27 +0000 (16:11 +0200)]
s4:torture:basic: eliminate potential for false failures in 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>
9 years agos4:torture:basic: use assert in the second loop in delayed_write_update1
Michael Adam [Thu, 2 Oct 2014 13:58:05 +0000 (15:58 +0200)]
s4:torture:basic: use assert in the second loop in delayed_write_update1

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>
9 years agos4:torture:basic: add check for size after initial write to delayed_write_update1
Michael Adam [Thu, 2 Oct 2014 14:32:41 +0000 (16:32 +0200)]
s4:torture:basic: add check for size after initial write to delayed_write_update1

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: add update into past as error condition in delayed_write_update1
Michael Adam [Thu, 2 Oct 2014 13:52:57 +0000 (15:52 +0200)]
s4:torture:basic: add update into past as error condition in delayed_write_update1

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: make use of torture_assert macros in delayed_write_update1
Michael Adam [Thu, 2 Oct 2014 13:35:09 +0000 (15:35 +0200)]
s4:torture:basic: make use of torture_assert macros in delayed_write_update1

No logic change except for adding early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: whitespace fix in delayed_write_update1
Michael Adam [Thu, 2 Oct 2014 13:25:34 +0000 (15:25 +0200)]
s4:torture:basic: whitespace fix in delayed_write_update1

No diff with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: remove two unused variables from delayed_write_update3c
Michael Adam [Thu, 2 Oct 2014 12:53:01 +0000 (14:53 +0200)]
s4:torture:basic: remove two unused variables from delayed_write_update3c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: use torture_assert macros in delayed_write_update
Michael Adam [Thu, 2 Oct 2014 13:19:49 +0000 (15:19 +0200)]
s4:torture:basic: use torture_assert macros in delayed_write_update

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4:torture:basic: whitespace cleanup in delayed_write_update
Michael Adam [Thu, 2 Oct 2014 13:17:13 +0000 (15:17 +0200)]
s4:torture:basic: whitespace cleanup in delayed_write_update

git diff -w shows no diff

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agotorture: add torture_assert_u64_not_equal()
Michael Adam [Thu, 2 Oct 2014 11:03:05 +0000 (13:03 +0200)]
torture: add torture_assert_u64_not_equal()

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agotorture: add torture_assert_int_not_equal
Michael Adam [Thu, 2 Oct 2014 11:02:48 +0000 (13:02 +0200)]
torture: add torture_assert_int_not_equal

Signed-off-by: Michael Adam <obnox@samba.org>
9 years agoidl: declare frstrans_VersionVector public so that we can dump it to blob and vice...
Matthieu Patou [Mon, 29 Sep 2014 04:22:27 +0000 (21:22 -0700)]
idl: declare frstrans_VersionVector public so that we can dump it to blob and vice versa

Change-Id: Ica8dbe899eb257603ce6f7b2ea224c6533bdea46
Reviewed-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Thu Oct  2 14:27:02 CEST 2014 on sn-devel-104

9 years agoidl: frstrans.idl add frstrans_RdcClose
Matthieu Patou [Thu, 26 Sep 2013 06:53:21 +0000 (23:53 -0700)]
idl: frstrans.idl add frstrans_RdcClose

Change-Id: I32e88f542da7df21e253cfbf8c2b3cc17043c6c7

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoidl: improve frsrpc by adding missing flag, fixing typo (W -> VV) and making needed...
Matthieu Patou [Sat, 24 Sep 2011 01:09:48 +0000 (18:09 -0700)]
idl: improve frsrpc by adding missing flag, fixing typo (W -> VV) and making needed structure public

Change-Id: Ia507b5f627464ab78a145e54b276fc8d64ee3c14
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoidl: Add frs blobs for dumping of frs related blobs with ndrdump
Matthieu Patou [Wed, 18 Jul 2012 16:02:06 +0000 (09:02 -0700)]
idl: Add frs blobs for dumping of frs related blobs with ndrdump

Change-Id: I5f8375fee663e452c26f264d73f637beffb1f209
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoidl: Add compression_guid
Matthieu Patou [Thu, 1 Sep 2011 22:36:03 +0000 (00:36 +0200)]
idl: Add compression_guid

Change-Id: I3cfe3c8f4a405fcf9a54092b03e87f00e7abd2fb
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoidl: frsrpc depends on bkupblobs.idl and fscc.idl
Matthieu Patou [Wed, 18 Jul 2012 15:55:26 +0000 (08:55 -0700)]
idl: frsrpc depends on bkupblobs.idl and fscc.idl

Change-Id: I6ce1f4b28752765e7bc59c9eb7474ebd68d9b399
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoidl: add fscc needed by frsrpc
Matthieu Patou [Thu, 18 Aug 2011 17:07:40 +0000 (19:07 +0200)]
idl: add fscc needed by frsrpc

Change-Id: Ib44a57b38a194e727242267a4821c88a15219eab
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoidl: add nt backup blobs format
Matthieu Patou [Thu, 18 Aug 2011 17:07:14 +0000 (19:07 +0200)]
idl: add nt backup blobs format

Change-Id: I4a43e1fe5fcebf2a4647ea2fbc9985663c0d7af2
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Matthieu Patou <mat@matws.net>
9 years agoidl: frsrpc we don't need NDR_REMAINING as size of the blob is one the wire
Matthieu Patou [Sun, 7 Aug 2011 05:41:00 +0000 (09:41 +0400)]
idl: frsrpc we don't need NDR_REMAINING as size of the blob is one the wire

Change-Id: Ia3f1a16668e97ae7b45a8d9ee4d0539c2652eb82
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Matthieu Patou <mat@matws.net>
9 years agoidl: frsrpc cleaning, opnum 4->10 didn't exists
Matthieu Patou [Mon, 1 Aug 2011 09:53:32 +0000 (13:53 +0400)]
idl: frsrpc cleaning, opnum 4->10 didn't exists

Change-Id: I6b45ffdead170e9f83deb8d16082cc9bb0366d47
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Matthieu Patou <mat@matws.net>
9 years agolib: Use GUID_buf_string in GUID_string
Volker Lendecke [Tue, 30 Sep 2014 06:32:36 +0000 (06:32 +0000)]
lib: Use GUID_buf_string in GUID_string

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
9 years agoCreate talloc-less functions for formating GUID
Matthieu Patou [Thu, 25 Sep 2014 08:14:27 +0000 (01:14 -0700)]
Create talloc-less functions for formating GUID

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Change-Id: I84adc45d2476dd225315bfc7dbb313f1b36b31e7

9 years agoswrap: Bump version to 1.1.2.
Andreas Schneider [Thu, 2 Oct 2014 05:26:35 +0000 (07:26 +0200)]
swrap: Bump version to 1.1.2.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Oct  2 12:00:14 CEST 2014 on sn-devel-104

9 years agoswrap: Add support for eventfd with unsigned count variable.
Andreas Schneider [Thu, 2 Oct 2014 05:25:32 +0000 (07:25 +0200)]
swrap: Add support for eventfd with unsigned count variable.

The prototype in glibc 2.20.90 changed.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Add a trace message for swrap_socket().
Andreas Schneider [Thu, 2 Oct 2014 05:24:55 +0000 (07:24 +0200)]
swrap: Add a trace message for swrap_socket().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Implement fcntl() to catch F_DUPFD.
Andreas Schneider [Thu, 2 Oct 2014 05:24:27 +0000 (07:24 +0200)]
swrap: Implement fcntl() to catch F_DUPFD.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Include the function name in the debug output.
Andreas Schneider [Thu, 2 Oct 2014 05:23:53 +0000 (07:23 +0200)]
swrap: Include the function name in the debug output.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Silence alignment warnings.
Andreas Schneider [Thu, 2 Oct 2014 05:23:25 +0000 (07:23 +0200)]
swrap: Silence alignment warnings.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Fix type punning warnings when loading functions.
Andreas Schneider [Thu, 2 Oct 2014 05:22:59 +0000 (07:22 +0200)]
swrap: Fix type punning warnings when loading functions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Fix access to struct members in log messages.
Andreas Schneider [Thu, 2 Oct 2014 05:22:13 +0000 (07:22 +0200)]
swrap: Fix access to struct members in log messages.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Fix whitespace errors.
Andreas Schneider [Thu, 2 Oct 2014 05:20:53 +0000 (07:20 +0200)]
swrap: Fix whitespace errors.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Update copyright notice.
Andreas Schneider [Thu, 2 Oct 2014 05:20:15 +0000 (07:20 +0200)]
swrap: Update copyright notice.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Wrap fopen to detect stale file descriptors.
Andreas Schneider [Thu, 2 Oct 2014 05:18:48 +0000 (07:18 +0200)]
swrap: Wrap fopen to detect stale file descriptors.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Use swrap_address in swrap_accept().
Andreas Schneider [Thu, 2 Oct 2014 05:18:14 +0000 (07:18 +0200)]
swrap: Use swrap_address in swrap_accept().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Remove unused sockaddr_dup() function.
Andreas Schneider [Thu, 2 Oct 2014 05:17:42 +0000 (07:17 +0200)]
swrap: Remove unused sockaddr_dup() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>