summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers for python/samba/subunit.Jelmer Vernooij2015-03-062-0/+22
| | | | | | Change-Id: I5b554051f23f31d20b4f4325debcd6717ba8369e Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Use samba.subunit.run to run subunit tests.Jelmer Vernooij2015-03-061-14/+1
| | | | | | Change-Id: Id9bdd33b7ac5e4db40ab8bef4dbe0f04c36d8da7 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* subunitrun: Update instructions for running subunit tests.Jelmer Vernooij2015-03-061-1/+1
| | | | | | Change-Id: Icaf472198e93e283db2ae6ed99fd7ceae037af87 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* subunitrun: Use new samba.subunit.run module.Jelmer Vernooij2015-03-061-10/+2
| | | | | | Change-Id: I4a4d2237ec9ef090bf95a0ea57285610047451e5 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest/tests/*.py: remove use of testtools.Jelmer Vernooij2015-03-066-7/+5
| | | | | | Change-Id: Ia692c6b3037b7d867310c3793980f9f953d31680 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add simple subunit runner outputting subunit v1.Jelmer Vernooij2015-03-062-0/+750
| | | | | | | | | | This is a short module (< 1k lines) that removes the need to depend on subunit, testtools, extras and mimeparse. It is based on an extract from testtools and subunit. Change-Id: I0a4f3060b25f7bde602a07ed6bef71c8196fca64 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-tests: Check for readable, not executable, scriptMartin Schwenke2015-03-061-1/+1
| | | | | | | | | | | | | Scripts in eventscript unit tests are run under an explicitly specified shell so they do not need to be executable. Checking that the script is executable breaks on scripts that are installed without the execute bit set, such as disabled eventscripts. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Mar 6 04:40:07 CET 2015 on sn-devel-104
* perfcount: Fix CID 1035494 Out-of-bounds readVolker Lendecke2015-03-051-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Thu Mar 5 18:28:44 CET 2015 on sn-devel-104
* perfcount: Fix CID 1035493 Out-of-bounds readVolker Lendecke2015-03-051-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* perfcount: Fix CID 1035492 Out-of-bounds readVolker Lendecke2015-03-051-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* perfcount: Fix CID 1274043 Division or modulo by zeroVolker Lendecke2015-03-051-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* printing: increse log level for unreachable cups serversBjörn Jacke2015-03-051-2/+2
| | | | | | | | | | | | | this annoying messages hitting the logs very often on non-cups servers by default in log level 0 otherwise. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11133 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Thu Mar 5 14:38:42 CET 2015 on sn-devel-104
* ctdb-locking: Back-off from logging every 10 secondsAmitay Isaacs2015-03-051-4/+16
| | | | | | | | | | | | | | | | | | | If ctdb_lock_helper cannot get a lock within 10 seconds, ctdb daemon logs a message and invokes an external debug script. This is repeated every 10 seconds. In case of a contention or on a loaded system, there can be multiple ctdb_lock_helper processes waiting to get lock on record(s). For each lock request taking longer, ctdb daemon will flood the log every 10 seconds. Instead of logging aggressively every 10 seconds, relax logging to every 100s and 1000s if the elapsed time has exceeded 100s and 1000s respectively. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Mar 5 12:06:44 CET 2015 on sn-devel-104
* ctdb-tests: Correctly cascade test failures from the end of pipesAmitay Isaacs2015-03-052-3/+9
| | | | | | | | | | | | | Some eventscript unit test failures get lost because _passed=false is set in the tail of a pipe. Add a new function test_fail() and call it when necessary to ensure the value of _passed is set correctly. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Mar 5 07:16:54 CET 2015 on sn-devel-104
* ctdb-scripts: Add a 'rm' stub so statd-callout tests work correctlyAmitay Isaacs2015-03-051-0/+6
| | | | | | | | | | statd-callout tries to remove global files from /var/lib/nfs/statd and this causes errors in tests. Add an rm stub that ignores attempts to remove these files but invokes /bin/rm for anything else. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Martin Schwenke <martin@meltin.net>
* rpc_server: Fix CID 1273433 Unused valueVolker Lendecke2015-03-041-1/+1
| | | | | | | | 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): Wed Mar 4 23:29:01 CET 2015 on sn-devel-104
* rpc_server: Fix CID 1035535 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | | | | | | I believe this can't happen, but better be safe than sorry Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 4 17:14:53 CET 2015 on sn-devel-104
* rpc_server: Fix CID 1035534 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | | | I believe this can't happen, but better be safe than sorry Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* backupkey: Remove an unused variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* backupkey: Fix CID 1273293 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* backupkey: Fix a memleakVolker Lendecke2015-03-041-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* backupkey: Simplify get_lsa_secretVolker Lendecke2015-03-041-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* backupkey: Slightly simplify bkrp_do_retrieve_server_wrap_keyVolker Lendecke2015-03-041-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* winbind: Fix CID 1273294 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* winbind: Fix CID 1273295 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libads: Fix CID 1273305 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libads: Fix CID 1273306 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1273292 Uninitialized pointer readVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1273056 Negative array index readVolker Lendecke2015-03-041-1/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1128561 Pointer to local outside scopeVolker Lendecke2015-03-041-2/+3
| | | | | | | | This is not strictly a bug, but it is confusing enough to justify a small patch I guess. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Fix whitespaceVolker Lendecke2015-03-042-54/+52
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1128552 Buffer not null terminatedVolker Lendecke2015-03-041-6/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* build:wafadmin: fix use of spaces instead of tabs.Michael Adam2015-03-041-3/+3
| | | | | | | | Indentation should not be a mixture of tabs and spaces. Waf uses tabs. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* ctdb-build: Specify absolute path to libsocket-wrapper.soAmitay Isaacs2015-03-041-1/+2
| | | | | | | | | | | | | Specifying a relative path to LD_PRELOAD can fail if any of the test scripts uses cd to change directory and execute commands. Adding statd-callout tests breaks autotest since statd-callout does "cd". Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Mar 4 13:11:53 CET 2015 on sn-devel-104
* ctdb-tests: Remove the old, confusing INSTALL scriptMartin Schwenke2015-03-041-96/+0
| | | | | | | It is not used after switching to waf build. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Remove unused function nfs_statd_update()Martin Schwenke2015-03-041-17/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Change statd-callout to be more scalableMartin Schwenke2015-03-0411-59/+123
| | | | | | | | | | | | | | | | Updating ctdb.tdb on each add-client, del-client and each delete during notify was too ambitious. Persistent transactions do not perform well enough to do this. Revert to having add-client and del-client create touch files. Each monitor event calls "statd-callout update" to convert touch files into ctdb.tdb records. Update testcases to do the "update" and add an extra test. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Fix a regression in statd-calloutMartin Schwenke2015-03-041-1/+1
| | | | | | | | | | | | | | | | Commit 4638010abb116aed0c180207aaa11475277aecb7 changed from using gensub() to gsub() in awk. However, it didn't halve the number of backslashes in the target strings. This is necessary because backslash is used in gensub() target strings to allow substitution of text matching parenthesised subexpressions. This is not the case with gsub(). So, halve the number of backslashes in the target string where gsub() is used in statd-callout. This is the only target string broken by changes made by the above commit Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Unit tests for statd-calloutMartin Schwenke2015-03-0411-13/+196
| | | | | | | | | With improvements to unit test infrastructure to support. This includes linking the real statd-callout into etc-ctdb/ in place of the placeholder script. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Make setup of public addresses more obviousMartin Schwenke2015-03-041-11/+28
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Extend eventscript unit test infrastructure for other scriptsMartin Schwenke2015-03-041-6/+19
| | | | | | | | There's so much infrastructure here that it would be a shame not to use it for testing things like statd-callout. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Support testing scripts that change directoryMartin Schwenke2015-03-042-0/+8
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Extend ctdb stub to support "ip" with and without -XMartin Schwenke2015-03-041-8/+20
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Extend ctdb stub to support "ptrans", "pdelete", "catdb"Martin Schwenke2015-03-041-14/+87
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* tevent: version 0.9.24David Disseldorp2015-03-042-1/+89
| | | | | | | | | | * Ignore unsolicited signal wakeup in tevent_port event loop. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Mar 4 08:33:06 CET 2015 on sn-devel-104
* pyldb: Add tests for type errorsPetr Viktorin2015-03-041-0/+42
| | | | | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Mar 4 01:49:02 CET 2015 on sn-devel-104
* pyldb: Report errors converting controls list to char**Petr Viktorin2015-03-031-0/+20
| | | | | | | | | With this change, passing an unexpected type to the CRUD methods will result in an informative TypeError. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Better error reportingPetr Viktorin2015-03-031-2/+2
| | | | | | | | Provide more useful error messages for some type errors Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Type-check arguments parsed with PyArg_ParseTuple*Petr Viktorin2015-03-031-8/+8
| | | | | | | | | PyObject* arguments need to be type-checked before they're cast to subtypes. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Fix reference leaksPetr Viktorin2015-03-031-6/+12
| | | | | | | | | | | | | The parse_ldif and MessageElement.__iter__ functions leaked references to intermediate lists whose iterators they return. The MessageElement repr used the undocumented macro PyObject_REPR, which leaks references. (It was used internally in CPython before fatal errors, and will be removed in Python 3.5.) Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>