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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The UNIT subdirectory directory will contain all unit tests. Use an
uppercase name to avoid conflicts with source code subdirectories.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This is now local to run_tests.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Sep 24 03:46:59 UTC 2019 on sn-devel-184
CTDB_TEST_TMP_DIR repaces SIMPLE_TESTS_VAR_DIR. local.bash no longer
needs to ensure that TEST_VAR_DIR is set, since it longer uses this
variable. Drop the comment because state has not been maintained
between tests for some time.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This is a subdirectory of TEST_VAR_DIR that is unique to the current
test suite. It is recreated for each individual test.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
With some upcoming changes, the setting of CTDB_BASE becomes
problematic because it will be included unconditionally whereas it is
currently being conveniently and almost accidentally not include in
some contexts.
So, instead of trying to coerce onnode into behaving as desired, have
the local daemons tests use local_daemons.sh onnode directly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
On my laptop this is "memcheck-amd64-linux instead of just "memcheck".
Alternatively, this part of the test could simply be skipped if
$VALGRIND is set.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This covers the following:
SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
POSIX agrees that -a and -o should not be used:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
Fixing these doesn't cause much churn.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Ensure that p is not leaked.
This is a test program and the program exits anyway. No need to
backport.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This means less random files dropped in /tmp or similar.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
The usage message says it is dodgy and some test suites may not
support it.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
There is no point inventing a whole new set of options here.
Continue to locally implement the --no-event-scripts option. This
must be first, though in practice only one option is ever passed to
setup_ctdb() from ctdb_test_init().
Simply pass all other options through to "local_daemons.sh setup".
This has the side effect of causing failure when an invalid option is
passed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
SC2086 Double quote to prevent globbing and word splitting
This one doesn't need the double quotes if it is contained within the
preceding variable expansion.
SC2181 Check exit code directly with e.g. 'if mycmd;', not indirectly with $?
SC2004 $/${} is unnecessary on arithmetic variables
These are straightforward.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This is only needed for setup_ctdb_base() so only set it when calling
this function.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
The nested, arbitrary use of onnode can cause messages from ssh on
stderr to appear in the node list:
Getting list of nodes...
Output of "onnode -pq all ctdb pnn | grep '^[0-9][0-9]*$'":
Warning: Permanently added '10.0.0.72' (RSA) to the list of known hosts.^M
Warning: Permanently added '10.0.0.75' (RSA) to the list of known hosts.^M
Warning: Permanently added '10.0.0.73' (RSA) to the list of known hosts.^M
Warning: Permanently added '10.0.0.74' (RSA) to the list of known hosts.^M
1
0
3
2
Create/wipe test database rec_test.tdb
Failed to execute "Permanently added '10.0.0.72' (RSA) to the list of known hosts.^M ctdb attach rec_test.tdb" on node(s) "Warning:"
Invalid <nodespec>
Avoid that by using an existing function that does not nest ssh uses.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Commit ea7708d8c7 simplified
01.reclock.script and removed include of functions file which is
required for setting CTDB_HELPER_BINDIR and for die() function.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
librados and libcephfs are both dependent on ceph-common, but
ctdb_mutex_ceph_rados_helper and vfs_ceph needn't be explicitly linked
against it.
Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep 2 03:44:24 UTC 2019 on sn-devel-184
--with-libcephfs=<path> provides a mechanism for explicitly specifying
header and library paths for Ceph. This adds unnecessary complexity and
can be achieved using generic compiler environment variables (e.g.
GCC LIBRARY_PATH and C_INCLUDE_PATH), so drop --with-libcephfs support.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Direct leak of 256 byte(s) in 8 object(s) allocated from:
#0 0x7f11b90d9c08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08)
#1 0x7f11b8f395df in tdb_alloc_read ../../../lib/tdb/common/io.c:696
#2 0x7f11b8f290ee in _tdb_fetch ../../../lib/tdb/common/tdb.c:274
#3 0x7f11b8f29379 in tdb_fetch ../../../lib/tdb/common/tdb.c:283
#4 0x473ecc in ltdb_fetch ../../tests/src/fake_ctdbd.c:904
#5 0x478b40 in ltdb_transaction_update ../../tests/src/fake_ctdbd.c:993
#6 0x41fef2 in ctdb_rec_buffer_traverse ../../protocol/protocol_types.c:1656
#7 0x48108b in ltdb_transaction ../../tests/src/fake_ctdbd.c:1026
#8 0x48108b in control_trans3_commit ../../tests/src/fake_ctdbd.c:2878
#9 0x48108b in client_process_control ../../tests/src/fake_ctdbd.c:4147
#10 0x48108b in client_process_packet ../../tests/src/fake_ctdbd.c:3839
#11 0x4847f5 in client_read_handler ../../tests/src/fake_ctdbd.c:3806
#12 0x44f620 in comm_read_done ../../common/comm.c:208
#13 0x7f11b8f94fe8 in _tevent_req_notify_callback ../../../lib/tevent/tevent_req.c:141
#14 0x7f11b8f951fd in tevent_req_finish ../../../lib/tevent/tevent_req.c:193
#15 0x7f11b8f95265 in _tevent_req_done ../../../lib/tevent/tevent_req.c:199
#16 0x44e876 in pkt_read_handler ../../common/pkt_read.c:133
#17 0x44f315 in comm_fd_handler ../../common/comm.c:412
#18 0x7f11b8f92896 in tevent_common_invoke_fd_handler ../../../lib/tevent/tevent_fd.c:138
#19 0x7f11b8fa6937 in epoll_event_loop ../../../lib/tevent/tevent_epoll.c:736
#20 0x7f11b8fa6937 in epoll_event_loop_once ../../../lib/tevent/tevent_epoll.c:937
#21 0x7f11b8f9f53e in std_event_loop_once ../../../lib/tevent/tevent_standard.c:110
#22 0x7f11b8f90f34 in _tevent_loop_once ../../../lib/tevent/tevent.c:772
#23 0x7f11b8f955f1 in tevent_req_poll ../../../lib/tevent/tevent_req.c:300
#24 0x485a04 in start_server ../../tests/src/fake_ctdbd.c:4450
#25 0x485a04 in main ../../tests/src/fake_ctdbd.c:4544
#26 0x7f11b8c60412 in __libc_start_main (/lib64/libc.so.6+0x24412)
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Aug 26 10:19:30 UTC 2019 on sn-devel-184