1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Tests - update test code for ctdb tool code and libctdb stubs

Rename ctdb_parse_nodestring.c to ctdb_tool_libctdb.c.  It can contain
many tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d597020af01dfcdf0d39e1cf579bf33f43f87dda)
This commit is contained in:
Martin Schwenke 2011-12-07 14:04:54 +11:00
parent bfab62dd41
commit 97863216ed
2 changed files with 7 additions and 6 deletions

View File

@ -84,7 +84,7 @@ TEST_BINS=tests/bin/ctdb_bench tests/bin/ctdb_fetch tests/bin/ctdb_fetch_one \
tests/bin/ctdb_randrec tests/bin/ctdb_persistent \
tests/bin/ctdb_traverse tests/bin/rb_test tests/bin/ctdb_transaction \
tests/bin/ctdb_takeover_tests tests/bin/ctdb_update_record \
tests/bin/ctdb_parse_nodestring \
tests/bin/ctdb_tool_libctdb \
@INFINIBAND_BINS@
BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify bin/ping_pong bin/ltdbtool @CTDB_PMDA@
@ -248,11 +248,11 @@ tests/bin/ctdb_takeover_tests: $(CTDB_TEST_OBJ) tests/src/ctdb_takeover_tests.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tests/src/ctdb_takeover_tests.o $(CTDB_TEST_OBJ) $(LIB_FLAGS)
tests/src/ctdb_parse_nodestring.o: tests/src/ctdb_parse_nodestring.c tests/src/libctdb_test.c $(CTDB_TEST_C)
tests/src/ctdb_tool_libctdb.o: tests/src/ctdb_tool_libctdb.c tests/src/libctdb_test.c $(CTDB_TEST_C)
tests/bin/ctdb_parse_nodestring: $(CTDB_TEST_OBJ) tests/src/ctdb_parse_nodestring.o
tests/bin/ctdb_tool_libctdb: $(CTDB_TEST_OBJ) tests/src/ctdb_tool_libctdb.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tests/src/ctdb_parse_nodestring.o $(CTDB_TEST_OBJ) @POPT_OBJ@ $(LIB_FLAGS)
@$(CC) $(CFLAGS) -o $@ tests/src/ctdb_tool_libctdb.o $(CTDB_TEST_OBJ) @POPT_OBJ@ $(LIB_FLAGS)
tests/bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o
@echo Linking $@

View File

@ -1,5 +1,5 @@
/*
Tests for tools/ctdb.c:parse_nodestring()
Tests for tools/ctdb.c and libctdb stubs
Copyright (C) Martin Schwenke 2011
@ -90,7 +90,8 @@ static void test_parse_nodestring(const char *nodestring_s,
libctdb_test_read_nodemap(ctdb);
if (parse_nodestring(NULL, nodestring, dd_ok, &nodes, &pnn_mode)) {
if (parse_nodestring(NULL, nodestring, CTDB_CURRENT_NODE, dd_ok,
&nodes, &pnn_mode)) {
print_nodes(nodes, pnn_mode);
}