[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Thu Mar 1 21:27:02 MST 2012
The branch, master has been updated
via ebe04fc pyldb: Fix some more long lines, fix formatting.
via fd7ba79 selftest: Move manual page into a separate file.
from 10700f6 selftest: Establish a registry of socket wrapper IPs
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ebe04fc652f78ccbf765d9afe1ecc67c5e302eed
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Mar 2 03:46:13 2012 +0100
pyldb: Fix some more long lines, fix formatting.
Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
Autobuild-Date: Fri Mar 2 05:26:56 CET 2012 on sn-devel-104
commit fd7ba79abac41eee221c6e24c2a762e651a41d65
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Mar 2 03:30:51 2012 +0100
selftest: Move manual page into a separate file.
(Generated using pod2man from selftest.pl itself)
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/pyldb.c | 51 +++++++++++++++++-------
selftest/selftest.pl | 101 ------------------------------------------------
selftest/selftest.pl.1 | 78 +++++++++++++++++++++++++++++++++++++
3 files changed, 115 insertions(+), 115 deletions(-)
create mode 100644 selftest/selftest.pl.1
Changeset truncated at 500 lines:
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index a2a5dff..ea7b695 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -707,16 +707,20 @@ static void py_ldb_debug(void *context, enum ldb_debug_level level, const char *
PyObject_CallFunction(fn, discard_const_p(char, "(i,O)"), level, PyString_FromFormatV(fmt, ap));
}
-static PyObject *py_ldb_set_debug(PyLdbObject *self, PyObject *args)
+static PyObject *py_ldb_set_debug(PyObject *self, PyObject *args)
{
PyObject *cb;
+ struct ldb_context *ldb_ctx;
if (!PyArg_ParseTuple(args, "O", &cb))
return NULL;
Py_INCREF(cb);
/* FIXME: Where do we DECREF cb ? */
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_set_debug(self->ldb_ctx, py_ldb_debug, cb), pyldb_Ldb_AsLdbContext(self));
+ ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError,
+ ldb_set_debug(ldb_ctx, py_ldb_debug, cb),
+ ldb_ctx);
Py_RETURN_NONE;
}
@@ -745,31 +749,46 @@ static PyObject *py_ldb_set_modules_dir(PyTypeObject *self, PyObject *args)
static PyObject *py_ldb_transaction_start(PyLdbObject *self)
{
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_transaction_start(pyldb_Ldb_AsLdbContext(self)), pyldb_Ldb_AsLdbContext(self));
+ struct ldb_context *ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ int ldb_err;
+ ldb_err = ldb_transaction_start(ldb_ctx);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_err, ldb_ctx);
Py_RETURN_NONE;
}
static PyObject *py_ldb_transaction_commit(PyLdbObject *self)
{
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_transaction_commit(pyldb_Ldb_AsLdbContext(self)), pyldb_Ldb_AsLdbContext(self));
+ struct ldb_context *ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ int ldb_err;
+ ldb_err = ldb_transaction_commit(ldb_ctx);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_err, ldb_ctx);
Py_RETURN_NONE;
}
static PyObject *py_ldb_transaction_prepare_commit(PyLdbObject *self)
{
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_transaction_prepare_commit(pyldb_Ldb_AsLdbContext(self)), pyldb_Ldb_AsLdbContext(self));
+ struct ldb_context *ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ int ldb_err;
+ ldb_err = ldb_transaction_prepare_commit(ldb_ctx);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_err, ldb_ctx);
Py_RETURN_NONE;
}
static PyObject *py_ldb_transaction_cancel(PyLdbObject *self)
{
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_transaction_cancel(pyldb_Ldb_AsLdbContext(self)), pyldb_Ldb_AsLdbContext(self));
+ struct ldb_context *ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ int ldb_err;
+ ldb_err = ldb_transaction_cancel(ldb_ctx);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_err, ldb_ctx);
Py_RETURN_NONE;
}
static PyObject *py_ldb_setup_wellknown_attributes(PyLdbObject *self)
{
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_setup_wellknown_attributes(pyldb_Ldb_AsLdbContext(self)), pyldb_Ldb_AsLdbContext(self));
+ struct ldb_context *ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ int ldb_err;
+ ldb_err = ldb_setup_wellknown_attributes(ldb_ctx);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_err, ldb_ctx);
Py_RETURN_NONE;
}
@@ -905,6 +924,7 @@ static PyObject *py_ldb_connect(PyLdbObject *self, PyObject *args, PyObject *kwa
int ret;
const char **options;
const char * const kwnames[] = { "url", "flags", "options", NULL };
+ struct ldb_context *ldb_ctx;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zIO",
discard_const_p(char *, kwnames),
@@ -919,11 +939,11 @@ static PyObject *py_ldb_connect(PyLdbObject *self, PyObject *args, PyObject *kwa
return NULL;
}
- ret = ldb_connect(pyldb_Ldb_AsLdbContext(self), url, flags, options);
+ ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ ret = ldb_connect(ldb_ctx, url, flags, options);
talloc_free(options);
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret,
- pyldb_Ldb_AsLdbContext(self));
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret, ldb_ctx);
Py_RETURN_NONE;
}
@@ -1145,7 +1165,7 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args, PyObject *kwargs)
ret = ldb_request(ldb_ctx, req);
if (ret == LDB_SUCCESS) {
ret = ldb_wait(req->handle, LDB_WAIT_ALL);
- }
+ }
if (ret == LDB_SUCCESS) {
ret = ldb_transaction_commit(ldb_ctx);
@@ -1327,12 +1347,15 @@ static PyObject *py_ldb_schema_attribute_add(PyLdbObject *self, PyObject *args)
char *attribute, *syntax;
unsigned int flags;
int ret;
+ struct ldb_context *ldb_ctx;
+
if (!PyArg_ParseTuple(args, "sIs", &attribute, &flags, &syntax))
return NULL;
- ret = ldb_schema_attribute_add(pyldb_Ldb_AsLdbContext(self), attribute, flags, syntax);
+ ldb_ctx = pyldb_Ldb_AsLdbContext(self);
+ ret = ldb_schema_attribute_add(ldb_ctx, attribute, flags, syntax);
- PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret, pyldb_Ldb_AsLdbContext(self));
+ PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret, ldb_ctx);
Py_RETURN_NONE;
}
@@ -2004,7 +2027,7 @@ static PyObject *py_ldb_module_search(PyLdbModuleObject *self, PyObject *args, P
talloc_free(req);
- return py_ret;
+ return py_ret;
}
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 72e9ddf..a6d4e14 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -16,107 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-=pod
-
-=head1 NAME
-
-selftest - Samba test runner
-
-=head1 SYNOPSIS
-
-selftest --help
-
-selftest [--srcdir=DIR] [--bindir=DIR] [--target=samba|samba3|win] [--socket-wrapper] [--quick] [--exclude=FILE] [--include=FILE] [--one] [--prefix=prefix] [--testlist=FILE] [TESTS]
-
-=head1 DESCRIPTION
-
-A simple test runner. TESTS is a regular expression with tests to run.
-
-=head1 OPTIONS
-
-=over 4
-
-=item I<--help>
-
-Show list of available options.
-
-=item I<--srcdir=DIR>
-
-Source directory.
-
-=item I<--bindir=DIR>
-
-Built binaries directory.
-
-=item I<--prefix=DIR>
-
-Change directory to run tests in. Default is 'st'.
-
-=item I<--target samba|samba3|win>
-
-Specify test target against which to run. Default is 'samba4'.
-
-=item I<--quick>
-
-Run only a limited number of tests. Intended to run in about 30 seconds on
-moderately recent systems.
-
-=item I<--socket-wrapper>
-
-Use socket wrapper library for communication with server. Only works
-when the server is running locally.
-
-Will prevent TCP and UDP ports being opened on the local host but
-(transparently) redirects these calls to use unix domain sockets.
-
-=item I<--exclude>
-
-Specify a file containing a list of tests that should be skipped. Possible
-candidates are tests that segfault the server, flip or don't end.
-
-=item I<--include>
-
-Specify a file containing a list of tests that should be run. Same format
-as the --exclude flag.
-
-Not includes specified means all tests will be run.
-
-=item I<--one>
-
-Abort as soon as one test fails.
-
-=item I<--testlist>
-
-Load a list of tests from the specified location.
-
-=back
-
-=head1 ENVIRONMENT
-
-=over 4
-
-=item I<SMBD_VALGRIND>
-
-=item I<TORTURE_MAXTIME>
-
-=item I<VALGRIND>
-
-=item I<TLS_ENABLED>
-
-=item I<srcdir>
-
-=back
-
-=head1 LICENSE
-
-selftest is licensed under the GNU General Public License L<http://www.gnu.org/licenses/gpl.html>.
-
-=head1 AUTHOR
-
-Jelmer Vernooij
-
-=cut
-
use strict;
use FindBin qw($RealBin $Script);
diff --git a/selftest/selftest.pl.1 b/selftest/selftest.pl.1
new file mode 100644
index 0000000..f33b810
--- /dev/null
+++ b/selftest/selftest.pl.1
@@ -0,0 +1,78 @@
+.IX Title "SELFTEST 1"
+.TH SELFTEST 1 "2012-02-24" "selftest" "Samba"
+.if n .ad l
+.nh
+.SH "NAME"
+selftest \- Samba test runner
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+selftest \-\-help
+.PP
+selftest [\-\-srcdir=DIR] [\-\-bindir=DIR] [\-\-target=samba|samba3|win] [\-\-socket\-wrapper] [\-\-quick] [\-\-exclude=FILE] [\-\-include=FILE] [\-\-one] [\-\-prefix=prefix] [\-\-testlist=FILE] [\s-1TESTS\s0]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+A simple test runner. \s-1TESTS\s0 is a regular expression with tests to run.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fI\-\-help\fR" 4
+.IX Item "--help"
+Show list of available options.
+.IP "\fI\-\-srcdir=DIR\fR" 4
+.IX Item "--srcdir=DIR"
+Source directory.
+.IP "\fI\-\-bindir=DIR\fR" 4
+.IX Item "--bindir=DIR"
+Built binaries directory.
+.IP "\fI\-\-prefix=DIR\fR" 4
+.IX Item "--prefix=DIR"
+Change directory to run tests in. Default is 'st'.
+.IP "\fI\-\-target samba|samba3|win\fR" 4
+.IX Item "--target samba|samba3|win"
+Specify test target against which to run. Default is 'samba4'.
+.IP "\fI\-\-quick\fR" 4
+.IX Item "--quick"
+Run only a limited number of tests. Intended to run in about 30 seconds on
+moderately recent systems.
+.IP "\fI\-\-socket\-wrapper\fR" 4
+.IX Item "--socket-wrapper"
+Use socket wrapper library for communication with server. Only works
+when the server is running locally.
+.Sp
+Will prevent \s-1TCP\s0 and \s-1UDP\s0 ports being opened on the local host but
+(transparently) redirects these calls to use unix domain sockets.
+.IP "\fI\-\-exclude\fR" 4
+.IX Item "--exclude"
+Specify a file containing a list of tests that should be skipped. Possible
+candidates are tests that segfault the server, flip or don't end.
+.IP "\fI\-\-include\fR" 4
+.IX Item "--include"
+Specify a file containing a list of tests that should be run. Same format
+as the \-\-exclude flag.
+.Sp
+Not includes specified means all tests will be run.
+.IP "\fI\-\-one\fR" 4
+.IX Item "--one"
+Abort as soon as one test fails.
+.IP "\fI\-\-testlist\fR" 4
+.IX Item "--testlist"
+Load a list of tests from the specified location.
+.SH "ENVIRONMENT"
+.IX Header "ENVIRONMENT"
+.IP "\fI\s-1SMBD_VALGRIND\s0\fR" 4
+.IX Item "SMBD_VALGRIND"
+.PD 0
+.IP "\fI\s-1TORTURE_MAXTIME\s0\fR" 4
+.IX Item "TORTURE_MAXTIME"
+.IP "\fI\s-1VALGRIND\s0\fR" 4
+.IX Item "VALGRIND"
+.IP "\fI\s-1TLS_ENABLED\s0\fR" 4
+.IX Item "TLS_ENABLED"
+.IP "\fIsrcdir\fR" 4
+.IX Item "srcdir"
+.PD
+.SH "LICENSE"
+.IX Header "LICENSE"
+selftest is licensed under the \s-1GNU\s0 General Public License <http://www.gnu.org/licenses/gpl.html>.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Pidl was written by Jelmer Vernooij.
--
Samba Shared Repository
More information about the samba-cvs
mailing list