IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This is needed for AIX and possibly others.
Also provide a cheaper mktemp function is needed in the run_tests
script.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b2b572e9049c7138bd223226475bef8fe3e01f10)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 2438f3a4944f7adbcae4cc1b9d5452714244afe7)
Also update ips_are_on_nodeglob() to handle negation.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 13a5944f8a27d43006acfffba76958693cae7702)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 3221fce9ee2f6fdd3bb17a5e1629ad52a32f90d6)
If $CTDB_SERVICE_AUTOSTARTSTOP="yes" then service start/stop is done
in the background with logging.
Fix some unit tests for samba and winbind.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3a3dae4cb5ec8b4b8381a4013adda25b87641f3a)
Sometimes "ctdb sync" doesn't do its job, so we end up with unassigned
IPs.
If $test_node isn't set then this is bad. However, try a few times to
ensure it is set.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2fd0157382b42aa5c5212b8e743c6f589edc6662)
Note the old $CTDB_TEST_REAL_CLUSTER - it doesn't exist anymore...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 47180dc75d15f3d61470705603565b718491c9f8)
Instead of selecting the 1st pnn found, select the 1st one that isn't -1.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f02e501342112aab67aee95f253e29a670b29273)
This allows, for example, the public addresses file used by a
particular daemon to be known.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f4b7d14f2e3c7345e7a09abb27c32923fb78cbc4)
This allows a node's public addresses file to be hacked for testing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c7d6e4557d00de674737e2c8d6cbebaa2461c303)
If the -V option is given and no tests are supplied, the "cd" command
in run_tests.sh cause scripts/run_tests to interpret the argument to
-V incorrectly. Therefore, the wrapper scripts can't use "cd" because
they don't know what the options are doing!
Instead scripts/run_tests searches for each test relative to the
current directory and, if not previously found, then searches relative
to the top-level tests directory. This is a much better way of doing
things.
Given that run_tests.sh and run_cluster_tests.sh were starting to
contain duplicate complex logic, remove run_cluster_tests.sh and
replace it with a symlink to run_tests.sh. Run_tests.sh checks $0 to
see what options/defaults to use. Update INSTALL to deal with this.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ed2db1f4e8d2b222d7f912a4a007ce48a23e83b0)
Sets TEST_CLEANUP=true and causes $TEST_VAR_DIR to be removed... and
potentially other cleanup actions in testcases.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3219f221a858e499f084b8beb44610537312602b)
There are 2 subtleties:
* Local daemons currently use the in-tree tests/events.d/ subdirectory
for their eventscripts. However, some tests install/remove test-specific
eventscripts so now $TEST_VAR_DIR/events.d/ is used and the standard
eventscripts are copied there at setup time.
* The pgrep/pkill logic for killing local daemons currently relies on
ctdbd being run with a full path to tests/bin/ctdbd. If the tests
are installed and run against an installed daemon then this won't
work. Therefore, ctdbd is now expected to be in $PATH and is
found/killed by matching:
ctdbd --socket=.* --nlist .* --nopublicipcheck
This is complex but should avoid killing a real ctdbd running on a
node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 301491802eec0e49e108f5aae7d7be379703d72c)
Part of preparation to be able to install the tests. The current var/
subdirectories will end up somewhere in /usr/local/ or /usr/ and we
don't want to put temporary files there.
This creates a temporary TEST_VAR_DIR by default.
If -V is specified then the given directory will be used as
TEST_VAR_DIR. This allows the current behaviour where individual
integration tests can be run against already-running daemons 9with
sockets and other stuff already created) to save time and trouble.
Yes, there are plans for a clean-up option... ;-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8e4ec9a40bb7d392d7474b067a74fa121c069007)
This is unused and can't be used with the current test infrastructure.
It may have been useful with ctdb_test_env but I don't think it was
ever used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4aa879466dd46cb4e8710edbbaac1276521e475b)
Hardcoding "sh -x" is suboptimal because some scripts, like onnode,
require bash.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 246809af64c03d26288abff5907ed46614e72b15)
Also add a comment to explain what is being added to $PATH.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 704a3e3b83aff63e8f7b0650c141776ed2c1f047)
This is useful for using run_tests to run one test at a time within an
alternative test framework.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit dc71294a33e88baa4e85fa1fa66cab58a83c2607)
Move the contents to integration.bash and run_tests as appropriate.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6136ab02db261b26a2a58b526c913e37e8146841)
Testing with local daemons is the current default but this is not the
most common use case. Therefore, we make local daemons optional by
using the -l switch with run_tests or by setting TEST_LOCAL_DAEMONS to
the number of daemons to be used (-l sets this to 3).
TEST_LOCAL_DAEMONS replaces CTDB_TEST_NUM_DAEMONS and
CTDB_TEST_REAL_CLUSTER is removed.
Most relevant logic is moved from ctdb_test_env to integration.bash.
ctdb_test_check_real_cluster() is moved from integration.bash to
complex/scripts/local.bash.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 72ecae61c43b318ec94b527a12cbb0a382e8c3db)
* run_tests no longer includes common.sh, which is only to be included
by test cases. Therefore, it defines its own die() function.
* TEST_SUBDIR is now set in common.sh
* Move complex-only functions to complex/scripts/local.bash
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bfa1d6638d3e116640eb4e3bb71b21ba6ef8cae5)
Move some options from eventscripts/run_tests.sh to scripts/run_tests.
Remove the former.
Move some functions from eventscripts/scripts/local.sh to
scripts/unit.sh.
Both of these are modified during move so they are no longer
eventscript-specific.
Tweak */local.sh so that the new functions in unit.sh are used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7ff485687891732074c9fc9998502ca197663d02)