From 923d1ec2f451c336da4ca507af49a3e9a01f9449 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 12:41:21 +0100 Subject: Fix installation of python module for ldb and tdb. (This used to be commit 6c9a8bf9f03cef0fc1c5f7ec3f8786eccf79c851) --- source4/lib/ldb/Makefile.in | 1 + source4/lib/tdb/Makefile.in | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in index d3e027425b..756beb1fed 100644 --- a/source4/lib/ldb/Makefile.in +++ b/source4/lib/ldb/Makefile.in @@ -19,6 +19,7 @@ SWIG = swig EXTRA_OBJ=@EXTRA_OBJ@ TESTS=test-tdb.sh @TESTS@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ tdbdir = @tdbdir@ ldbdir = $(srcdir) diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in index 8c79f6e24c..4a95fdb380 100644 --- a/source4/lib/tdb/Makefile.in +++ b/source4/lib/tdb/Makefile.in @@ -32,11 +32,13 @@ tdbdir = @tdbdir@ TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@ -all:: showflags dirs $(PROGS) $(SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) +default: all include $(tdbdir)/tdb.mk include $(tdbdir)/rules.mk +all:: showflags dirs $(PROGS) $(SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) + install:: all $(SOLIB): $(TDB_OBJ) $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(SONAME) -- cgit From 69d6dd1923a511a883e9f562b8ffa2762a671fe0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 12:46:33 +0100 Subject: Make sure talloc.so is build before installing. (This used to be commit 51769f5cfc0f3a9f85ea533598a1f769e108d075) --- source4/lib/talloc/talloc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/lib/talloc/talloc.mk b/source4/lib/talloc/talloc.mk index 2dc75dd716..590adc74f2 100644 --- a/source4/lib/talloc/talloc.mk +++ b/source4/lib/talloc/talloc.mk @@ -1,10 +1,10 @@ -all:: libtalloc.a $(SOLIB) testsuite - TALLOC_OBJ = $(tallocdir)/talloc.o SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION) SONAME = libtalloc.$(SHLIBEXT).1 +all:: libtalloc.a $(SOLIB) testsuite + testsuite:: $(LIBOBJ) testsuite.o $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS) -- cgit From e08a78abcd7cf55322cc720f47fa3a2bfe491c31 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 12:16:38 +0100 Subject: [PATCH] composite: make it possible to call composite_is_ok() without callback fn metze (This used to be commit 4e459f1fb3ab60c586df9a08cdc57db424a30b18) --- source4/libcli/composite/composite.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index 67d5885497..aab7487a42 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -64,23 +64,6 @@ _PUBLIC_ NTSTATUS composite_wait(struct composite_context *c) return c->status; } - -/* - * Some composite helpers that are handy if you write larger composite - * functions. - */ -_PUBLIC_ bool composite_is_ok(struct composite_context *ctx) -{ - if (NT_STATUS_IS_OK(ctx->status)) { - return true; - } - ctx->state = COMPOSITE_STATE_ERROR; - if (ctx->async.fn != NULL) { - ctx->async.fn(ctx); - } - return false; -} - /* callback from composite_done() and composite_error() @@ -110,7 +93,10 @@ _PUBLIC_ void composite_error(struct composite_context *ctx, NTSTATUS status) event_add_timed(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); } ctx->status = status; - SMB_ASSERT(!composite_is_ok(ctx)); + ctx->state = COMPOSITE_STATE_ERROR; + if (ctx->async.fn != NULL) { + ctx->async.fn(ctx); + } } _PUBLIC_ bool composite_nomem(const void *p, struct composite_context *ctx) @@ -122,6 +108,15 @@ _PUBLIC_ bool composite_nomem(const void *p, struct composite_context *ctx) return true; } +_PUBLIC_ bool composite_is_ok(struct composite_context *ctx) +{ + if (NT_STATUS_IS_OK(ctx->status)) { + return true; + } + composite_error(ctx, ctx->status); + return false; +} + _PUBLIC_ void composite_done(struct composite_context *ctx) { if (!ctx->used_wait && !ctx->async.fn) { -- cgit From 18ef7670857eeaec59d68fb8063570e67c6297a6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 13:07:16 +0100 Subject: Specify PICFLAG when compiling python modules. (This used to be commit 981957165d09e82947f68475192f1ce1f0ddbdd3) --- source4/lib/ldb/ldb.mk | 2 +- source4/lib/tdb/tdb.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/lib/ldb/ldb.mk b/source4/lib/ldb/ldb.mk index ec4c34f6d8..6119f085d8 100644 --- a/source4/lib/ldb/ldb.mk +++ b/source4/lib/ldb/ldb.mk @@ -68,7 +68,7 @@ examples/ldifreader: examples/ldifreader.o $(LIBS) build-python:: _ldb.$(SHLIBEXT) ldb_wrap.o: $(ldbdir)/ldb_wrap.c - $(CC) -c $(ldbdir)/ldb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags` + $(CC) $(PICFLAG) -c $(ldbdir)/ldb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags` _ldb.$(SHLIBEXT): $(LIBS) ldb_wrap.o $(SHLD) $(SHLD_FLAGS) -o _ldb.$(SHLIBEXT) ldb_wrap.o $(LIB_FLAGS) diff --git a/source4/lib/tdb/tdb.mk b/source4/lib/tdb/tdb.mk index fe77a0492d..ea4389640e 100644 --- a/source4/lib/tdb/tdb.mk +++ b/source4/lib/tdb/tdb.mk @@ -36,7 +36,7 @@ clean:: build-python:: _tdb.$(SHLIBEXT) tdb_wrap.o: $(tdbdir)/tdb_wrap.c - $(CC) -c $(tdbdir)/tdb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags` + $(CC) $(PICFLAG) -c $(tdbdir)/tdb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags` _tdb.$(SHLIBEXT): libtdb.$(SHLIBEXT) tdb_wrap.o $(SHLD) $(SHLD_FLAGS) -o $@ tdb_wrap.o -L. -ltdb `$(PYTHON_CONFIG) --libs` -- cgit From 285820bdd4ea94ac78ded03ec6388ca8c777358c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 13:34:19 +0100 Subject: make sure libraries are built before attempting to install. (This used to be commit deb1dae2dabad3d74a1c6adf2c0b0d56917cca83) --- source4/lib/tdb/tdb.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/lib/tdb/tdb.mk b/source4/lib/tdb/tdb.mk index ea4389640e..5cf0d5badb 100644 --- a/source4/lib/tdb/tdb.mk +++ b/source4/lib/tdb/tdb.mk @@ -66,13 +66,13 @@ installdirs:: mkdir -p $(DESTDIR)$(libdir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig -installbin:: installdirs +installbin:: all installdirs cp $(PROGS) $(DESTDIR)$(bindir) installheaders:: installdirs cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir) -installlibs:: installdirs +installlibs:: all installdirs cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir) -- cgit From 1ed346fcb37f302341f528e2f8465d389f586742 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 13:51:03 +0100 Subject: Support using shared library during testsuite run if tdb was built with a shared lib internally. (This used to be commit 28539f48e6ad37a6436e6f2c6733ee1fcbc6567f) --- source4/lib/tdb/tdb.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/lib/tdb/tdb.mk b/source4/lib/tdb/tdb.mk index 5cf0d5badb..d0f9815c13 100644 --- a/source4/lib/tdb/tdb.mk +++ b/source4/lib/tdb/tdb.mk @@ -25,8 +25,8 @@ bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB) bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb -test:: bin/tdbtorture$(EXEEXT) - bin/tdbtorture$(EXEEXT) +test:: bin/tdbtorture$(EXEEXT) $(SONAME) + $(LIB_PATH_VAR)=. bin/tdbtorture$(EXEEXT) clean:: rm -f test.db test.tdb torture.tdb test.gdbm -- cgit From cb2f8d6cf4e6739f9dd5b4a9b21c9fbb4fb59609 Mon Sep 17 00:00:00 2001 From: Amin Azez Date: Tue, 29 Jan 2008 16:10:48 +0000 Subject: Fix open file tracking in vfs_cifs so that oplock breaks can propagate Oplock breaks were not propagating because the list of open files was not being maintained. This fixes that based on best-guess of how it should work. It has been tested manually with windows XP client obtaining an oplock from a windows 2003 server, which then broke the lock when smbclient read the same file. Previously the smbclient read blocked until the oplock timed out (This used to be commit 1a53aeff9a9e8fe83fde5a617463a5b363c45313) --- source4/ntvfs/cifs/vfs_cifs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 910401f157..901dd2cf7c 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -64,12 +64,16 @@ struct async_info { #define SETUP_PID private->tree->session->pid = req->smbpid -#define SETUP_FILE do { \ - struct cvfs_file *f; \ +#define SETUP_FILE_HERE(f) do { \ f = ntvfs_handle_get_backend_data(io->generic.in.file.ntvfs, ntvfs); \ if (!f) return NT_STATUS_INVALID_HANDLE; \ io->generic.in.file.fnum = f->fnum; \ -} while (0) +} while (0) + +#define SETUP_FILE do { \ + struct cvfs_file *f; \ + SETUP_FILE_HERE(f); \ +} while (0) #define SETUP_PID_AND_FILE do { \ SETUP_PID; \ @@ -484,6 +488,7 @@ static void async_open(struct smbcli_request *c_req) req->async_states->status = ntvfs_handle_set_backend_data(f->h, cvfs->ntvfs, f); if (!NT_STATUS_IS_OK(req->async_states->status)) goto failed; file->ntvfs = f->h; + DLIST_ADD(cvfs->files, f); failed: req->async_states->send_fn(req); } @@ -526,6 +531,7 @@ static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs, status = ntvfs_handle_set_backend_data(f->h, private->ntvfs, f); NT_STATUS_NOT_OK_RETURN(status); file->ntvfs = f->h; + DLIST_ADD(private->files, f); return NT_STATUS_OK; } @@ -752,6 +758,7 @@ static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs, { struct cvfs_private *private = ntvfs->private_data; struct smbcli_request *c_req; + struct cvfs_file *f; SETUP_PID; @@ -759,7 +766,12 @@ static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs, private->map_generic) { return ntvfs_map_close(ntvfs, req, io); } - SETUP_FILE; + SETUP_FILE_HERE(f); + /* Note, we aren't free-ing f, or it's h here. Should we? + even if file-close fails, we'll remove it from the list, + what else would we do? Maybe we should not remove until + after the proxied call completes? */ + DLIST_REMOVE(private->files, f); if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) { return smb_raw_close(private->tree, io); -- cgit From 7001a877d417f6b1e4125c5f2fb132e8577e9888 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 16:14:43 +0100 Subject: nbt.idl: don't use astring15 anymore and use an charset() array metze (This used to be commit bb143c76fb971bc2a1d69954d37ab20a953f2b69) --- source4/librpc/idl/nbt.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index d4c2bf1ad0..17304bfa0d 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -143,7 +143,7 @@ interface nbt } nbt_statistics; typedef struct { - astring15 name; + [charset(DOS)] uint8 name[15]; nbt_name_type type; nb_flags nb_flags; } nbt_status_name; -- cgit From 1f3e4e2deab26cae000268b4067ab8c2e2eee3ef Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 16:15:34 +0100 Subject: spoolss.idl: don't use string32 anymore and use an charset() array metze (This used to be commit 746a715715c7af8036192ba6d74e282ceaec8c0d) --- source4/librpc/idl/spoolss.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl index 114c06a00d..33b4dba7b2 100644 --- a/source4/librpc/idl/spoolss.idl +++ b/source4/librpc/idl/spoolss.idl @@ -58,7 +58,7 @@ import "security.idl", "winreg.idl"; } spoolss_PrinterInfo0; typedef [public,gensize] struct { - string32 devicename; + [charset(UTF16)] uint16 devicename[32]; uint16 specversion; uint16 driverversion; uint16 size; @@ -77,7 +77,7 @@ import "security.idl", "winreg.idl"; uint16 yresolution; uint16 ttoption; uint16 collate; - string32 formname; + [charset(UTF16)] uint16 formname[32]; uint16 logpixels; uint32 bitsperpel; uint32 pelswidth; -- cgit From be25cdebcbdd0c26050076629d4edfbababe2852 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 16:16:35 +0100 Subject: librpc: remove special support for fixed length strings Fixed arrays with the charset() attribute do the same metze (This used to be commit 9620b86e96e8065c0ff6db0d95130ab53581d468) --- source4/librpc/idl/idl_types.h | 12 ----------- source4/librpc/ndr/libndr.h | 2 -- source4/librpc/ndr/ndr_string.c | 45 +---------------------------------------- 3 files changed, 1 insertion(+), 58 deletions(-) diff --git a/source4/librpc/idl/idl_types.h b/source4/librpc/idl/idl_types.h index f21f3e660d..01524c2984 100644 --- a/source4/librpc/idl/idl_types.h +++ b/source4/librpc/idl/idl_types.h @@ -5,8 +5,6 @@ #define STR_NOTERM LIBNDR_FLAG_STR_NOTERM #define STR_NULLTERM LIBNDR_FLAG_STR_NULLTERM #define STR_BYTESIZE LIBNDR_FLAG_STR_BYTESIZE -#define STR_FIXLEN32 LIBNDR_FLAG_STR_FIXLEN32 -#define STR_FIXLEN15 LIBNDR_FLAG_STR_FIXLEN15 #define STR_CONFORMANT LIBNDR_FLAG_STR_CONFORMANT #define STR_CHARLEN LIBNDR_FLAG_STR_CHARLEN #define STR_UTF8 LIBNDR_FLAG_STR_UTF8 @@ -21,16 +19,6 @@ */ #define nstring [flag(STR_NULLTERM)] string -/* - fixed length 32 character UCS-2 string -*/ -#define string32 [flag(STR_FIXLEN32)] string - -/* - fixed length 16 character ascii string -*/ -#define astring15 [flag(STR_ASCII|STR_FIXLEN15)] string - /* an ascii string prefixed with [offset] [length], both 32 bits null terminated diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 1ecc6f3c38..731ef0f60b 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -109,11 +109,9 @@ struct ndr_print { #define LIBNDR_FLAG_STR_NULLTERM (1<<6) #define LIBNDR_FLAG_STR_SIZE2 (1<<7) #define LIBNDR_FLAG_STR_BYTESIZE (1<<8) -#define LIBNDR_FLAG_STR_FIXLEN32 (1<<9) #define LIBNDR_FLAG_STR_CONFORMANT (1<<10) #define LIBNDR_FLAG_STR_CHARLEN (1<<11) #define LIBNDR_FLAG_STR_UTF8 (1<<12) -#define LIBNDR_FLAG_STR_FIXLEN15 (1<<13) #define LIBNDR_STRING_FLAGS (0x7FFC) diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c index 69a7eca1a8..79548f81bc 100644 --- a/source4/librpc/ndr/ndr_string.c +++ b/source4/librpc/ndr/ndr_string.c @@ -259,24 +259,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, *s = as; break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: - len1 = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - NDR_PULL_NEED_BYTES(ndr, len1*byte_mul); - ret = convert_string_talloc(ndr->current_mem_ctx, - ndr->iconv_convenience, - chset, CH_UNIX, - ndr->data+ndr->offset, - len1*byte_mul, - (void **)&as); - if (ret == -1) { - return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad character conversion"); - } - NDR_CHECK(ndr_pull_advance(ndr, len1*byte_mul)); - *s = as; - break; - case LIBNDR_FLAG_STR_NOTERM: if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) { return ndr_pull_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x (missing NDR_REMAINING)\n", @@ -349,10 +331,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, flags &= ~LIBNDR_FLAG_STR_CONFORMANT; - if (!(flags & - (LIBNDR_FLAG_STR_NOTERM | - LIBNDR_FLAG_STR_FIXLEN15 | - LIBNDR_FLAG_STR_FIXLEN32))) { + if (!(flags & LIBNDR_FLAG_STR_NOTERM)) { s_len++; } d_len = convert_string_talloc(ndr, ndr->iconv_convenience, CH_UNIX, chset, s, s_len, (void **)&dest); @@ -399,21 +378,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: { - ssize_t fix_len = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - uint32_t pad_len = fix_len - d_len; - if (d_len > fix_len) { - return ndr_push_error(ndr, NDR_ERR_CHARCNV, - "Bad character conversion"); - } - NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); - if (pad_len != 0) { - NDR_CHECK(ndr_push_zero(ndr, pad_len)); - } - break; - } - default: if (ndr->flags & LIBNDR_FLAG_REMAINING) { NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); @@ -439,13 +403,6 @@ _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s) unsigned byte_mul = 2; unsigned c_len_term = 1; - if (flags & LIBNDR_FLAG_STR_FIXLEN32) { - return 32; - } - if (flags & LIBNDR_FLAG_STR_FIXLEN15) { - return 15; - } - c_len = s?strlen_m(s):0; if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_UTF8)) { -- cgit From fdd75e135a8cb43f946af99120566f744df2a8e0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 21:59:23 +0100 Subject: Correctly increment counters in Subunit test runner. (This used to be commit c474a2bb83a3e28a0b83f3b8ca1b646742dfca3d) --- source4/scripting/bin/subunitrun | 4 +--- source4/scripting/python/subunit/__init__.py | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 7142abed85..8dfe2def9c 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -21,6 +21,4 @@ from subunit import SubunitTestRunner import sys from unittest import TestProgram -program = TestProgram(module=None, argv=sys.argv, - testRunner=SubunitTestRunner()) -program.runTests() +TestProgram(module=None, argv=sys.argv, testRunner=SubunitTestRunner()) diff --git a/source4/scripting/python/subunit/__init__.py b/source4/scripting/python/subunit/__init__.py index 4d3434a3ea..7fcb815937 100644 --- a/source4/scripting/python/subunit/__init__.py +++ b/source4/scripting/python/subunit/__init__.py @@ -218,6 +218,7 @@ class TestProtocolClient(unittest.TestResult): for line in self._exc_info_to_string(error, test).splitlines(): self._stream.write("%s\n" % line) self._stream.write("]\n") + super(TestProtocolClient, self).addError(test, error) def addFailure(self, test, error): """Report a failure in test test.""" @@ -225,14 +226,17 @@ class TestProtocolClient(unittest.TestResult): for line in self._exc_info_to_string(error, test).splitlines(): self._stream.write("%s\n" % line) self._stream.write("]\n") + super(TestProtocolClient, self).addFailure(test, error) def addSuccess(self, test): """Report a success in a test.""" self._stream.write("successful: %s\n" % (test.shortDescription() or str(test))) + super(TestProtocolClient, self).addSuccess(test) def startTest(self, test): """Mark a test as starting its test run.""" self._stream.write("test: %s\n" % (test.shortDescription() or str(test))) + super(TestProtocolClient, self).startTest(test) def RemoteError(description=""): @@ -379,6 +383,5 @@ class SubunitTestRunner: def run(self, test): "Run the given test case or test suite." result = TestProtocolClient(self.stream) - test(result) return result -- cgit From 04aef38453ff977bf260546545e968fce3ddd599 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 12 Feb 2008 22:10:25 +0100 Subject: Fix subunit runner exit codes. (This used to be commit 7911308dbc1233838e44c533302f77b03ea41148) --- source4/scripting/bin/subunitrun | 3 ++- source4/scripting/python/subunit/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 8dfe2def9c..11ac426589 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -21,4 +21,5 @@ from subunit import SubunitTestRunner import sys from unittest import TestProgram -TestProgram(module=None, argv=sys.argv, testRunner=SubunitTestRunner()) +runner = SubunitTestRunner() +TestProgram(module=None, argv=sys.argv, testRunner=runner) diff --git a/source4/scripting/python/subunit/__init__.py b/source4/scripting/python/subunit/__init__.py index 7fcb815937..3abfbf522e 100644 --- a/source4/scripting/python/subunit/__init__.py +++ b/source4/scripting/python/subunit/__init__.py @@ -209,7 +209,7 @@ class TestProtocolClient(unittest.TestResult): """A class that looks like a TestResult and informs a TestProtocolServer.""" def __init__(self, stream): - unittest.TestResult.__init__(self) + super(TestProtocolClient, self).__init__() self._stream = stream def addError(self, test, error): @@ -383,5 +383,6 @@ class SubunitTestRunner: def run(self, test): "Run the given test case or test suite." result = TestProtocolClient(self.stream) + test(result) return result -- cgit From 3cfac63d165f072464e93a12f7ad48450c66477b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 12 Feb 2008 22:52:58 +0100 Subject: Raise version of talloc from 1.1.0 to 1.2.0 after adding talloc pools. Michael (This used to be commit 38855a9f145b54d05f4a508562fc1a6595e0d895) --- source4/lib/talloc/config.mk | 2 +- source4/lib/talloc/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/lib/talloc/config.mk b/source4/lib/talloc/config.mk index 9e949f900f..540a05d100 100644 --- a/source4/lib/talloc/config.mk +++ b/source4/lib/talloc/config.mk @@ -1,5 +1,5 @@ [LIBRARY::LIBTALLOC] -VERSION = 1.1.0 +VERSION = 1.2.0 SO_VERSION = 1 OBJ_FILES = talloc.o PC_FILE = talloc.pc diff --git a/source4/lib/talloc/configure.ac b/source4/lib/talloc/configure.ac index 7878d59300..4719aa04b5 100644 --- a/source4/lib/talloc/configure.ac +++ b/source4/lib/talloc/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.50) -AC_INIT(talloc, 1.1.0) +AC_INIT(talloc, 1.2.0) AC_CONFIG_SRCDIR([talloc.c]) AC_SUBST(datarootdir) AC_CONFIG_HEADER(config.h) -- cgit