[PATCH] CTDB test improvements
Martin Schwenke
martin at meltin.net
Tue Nov 6 03:18:02 UTC 2018
Hi Amitay,
On Tue, 6 Nov 2018 12:19:30 +1100, Amitay Isaacs <amitay at gmail.com>
wrote:
> On Mon, Nov 5, 2018 at 11:50 AM Martin Schwenke via samba-technical
> <samba-technical at lists.samba.org> wrote:
> >
> > 2 mains changes:
> >
> > * For integration testing ("simple" and "complex" test suites),
> > CTDB daemons are now started at the beginning of each test and
> > stopped at the end of each test
> >
> > This is true when running with local daemons and against a real
> > cluster. A side-effect of this is obviously that after testing the
> > cluster will now be down. This should not cause a problem because
> > the tests already affect cluster availability.
> >
> > Individual tests can now be run without depending on special tests
> > that start/stop the cluster. It is now also easier to loop a single
> > test.
> >
> > Daemons were previously not restarted at the end of each "simple"
> > test, so running that test suite now takes longer. The patch set
> > includes a small amount of rationalisation of tests to avoid
> > duplication and generally reduce the number of tests. More work is
> > needed... but a reasonable compromise has already been made.
> >
> > * Starting and stopping of local daemons in the "simple" test suite has
> > been factored out into a separate script called
> > ctdb/tests/local_daemons.sh (installed as ctdb_local_daemons)
> >
> > This script has setup/start/stop commands that are used by the test
> > suite, and can be used independently for hand testing/debugging. It
> > also has an onnode command, which sets any variables required to run
> > commands (e.g. ctdb status) against a cluster of local daemons for
> > debugging. There is also a print-socket command to print the ctdbd
> > socket being used by the designated nodes - this can be used by more
> > extensive clustered Samba testing to help configured (for example)
> > smbd instances against ctdbd instances.
> >
> > Note that this patch set depends on the other 2 that I have just posted
> > (config improvements, various fixes).
> >
> > Please review and maybe push...
>
> In patch "ctdb-tests: Add local_daemons.sh", fix the help text for -S.
How do you see these things? :-)
Fixed (changed <dir> to <library> - could have mde it <file>, but
figure this is clearer). I extended the message a bit to mention
preloading.
I also cleaned up -6, so that it mentions the (obvious?) default, since
all the other options mention their default.
> In patch "ctdb-daemon: Do not fork when CTDB_TEST_MODE is set", do not
> do boolean operations on integer variable. Please define interactive
> variable as bool.
OK, I added an additional commit before that one. Since popt uses an
int for flag options, I added int interactive_opt for popt, changed
interactive to be a bool, set interactive from interactive_opt and then
finally got rid of the ternary operator in the call to
ctdb_start_daemon() because we can finally just negate a bool. :-)
New version attached...
peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb-tests.patch
Type: text/x-patch
Size: 124269 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181106/b59f1391/ctdb-tests-0001.bin>
More information about the samba-technical
mailing list