[PATCH] ctdb-test: Add tests to verify queue processing

Martin Schwenke martin at meltin.net
Mon Mar 18 10:58:10 UTC 2019


Hi Swen,

On Thu, 14 Mar 2019 13:27:21 +0100, swen <swen at linux.ibm.com> wrote:

> On Thu, 2019-03-14 at 21:56 +1100, Martin Schwenke via samba-technical
> wrote:

> > On Thu, 07 Mar 2019 13:03:15 +0100, swen <swen at linux.ibm.com> wrote:
> >   
> > > Followed Christof's good example and created a test verifying
> > > the correct processing of CTDB's queue buffer.  
> > 
> > This looks like it might fit nicely into the existing
> > ctdb/tests/src/ctdb_io_test.c instead of creating a new test program.  
> Hmm, well it actually doesn't fit nicely :-)
> 
> The existing tests do investigate what's received on "client" side and
> therefore, do not check or need anything on the servers side.
> 
> The tests I'm adding are actually covering the server side and
> investigate the queue itself and the byte-pushing there... not care'ing
> what's received.
> 
> Due to this difference the existing tests have no reference to the
> queue which is needed fo the tests I would like t add.
> 
> Aynhow, if you'd prefer to just have on file containing the tests,
> I guess, I could do that. Just thought it would be nicer to have the
> separation because of what I described.
> 
> You pick, I don't mind.

I think the 2 infrastructure functions (ctdb_set_error() and
test_setup()) are similar enough that we don't need another file with
them essentially duplicated.  I would just add a struct ctdb_queue **
argument to test_setup() and set that if non-NULL is passed in.  Then
you're only really adding a couple of testcases...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190318/6d22d6de/attachment.sig>


More information about the samba-technical mailing list