platform/tests/trivial: rename init_tests() and setup_tests() function

Make it clear that they are nmtstp functions, i.e. they are found
in the header "test-common.h".
This commit is contained in:
Thomas Haller 2016-04-06 21:16:49 +02:00
parent 93c81a809d
commit 25d826ec49
9 changed files with 20 additions and 18 deletions

View file

@ -126,13 +126,13 @@ fixture_teardown (test_fixture *fixture, gconstpointer user_data)
}
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_with_logging (argc, argv, NULL, "ALL");
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
g_test_add ("/arping/1", test_fixture, NULL, fixture_setup, test_arping_1, fixture_teardown);
g_test_add ("/arping/2", test_fixture, NULL, fixture_setup, test_arping_2, fixture_teardown);

View file

@ -435,13 +435,13 @@ _test_recv_fixture_teardown (TestRecvFixture *fixture, gconstpointer user_data)
/*****************************************************************************/
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_assert_logging (argc, argv, "WARN", "ALL");
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
#define _TEST_ADD_RECV(testpath, testdata) \
g_test_add (testpath, TestRecvFixture, testdata, _test_recv_fixture_setup, test_recv, _test_recv_fixture_teardown)

View file

@ -355,7 +355,7 @@ test_ip4_address_peer_zero (void)
/*****************************************************************************/
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_with_logging (argc, argv, NULL, "ALL");
}
@ -412,7 +412,7 @@ _g_test_add_func (const char *testpath,
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
_g_test_add_func ("/address/ipv4/general", test_ip4_address_general);
_g_test_add_func ("/address/ipv6/general", test_ip6_address_general);

View file

@ -107,13 +107,13 @@ test_cleanup_internal (void)
}
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_with_logging (argc, argv, NULL, "ALL");
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
nm_platform_link_delete (NM_PLATFORM_GET, nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME));
g_assert (!nm_platform_link_get_by_ifname (NM_PLATFORM_GET, DEVICE_NAME));

View file

@ -1535,7 +1535,7 @@ main (int argc, char **argv)
int result;
const char *program = *argv;
init_tests (&argc, &argv);
_nmtstp_init_tests (&argc, &argv);
if ( nmtstp_is_root_test ()
&& (geteuid () != 0 || getegid () != 0)) {
@ -1593,7 +1593,7 @@ main (int argc, char **argv)
SETUP ();
setup_tests ();
_nmtstp_setup_tests ();
result = g_test_run ();

View file

@ -182,6 +182,8 @@ void nmtstp_link_del (gboolean external_command,
int ifindex,
const char *name);
void init_tests (int *argc, char ***argv);
void setup_tests (void);
/*****************************************************************************/
void _nmtstp_init_tests (int *argc, char ***argv);
void _nmtstp_setup_tests (void);

View file

@ -2293,13 +2293,13 @@ test_netns_bind_to_path (gpointer fixture, gconstpointer test_data)
/*****************************************************************************/
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_with_logging (argc, argv, NULL, "ALL");
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
nm_platform_link_delete (NM_PLATFORM_GET, nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME));
nm_platform_link_delete (NM_PLATFORM_GET, nm_platform_link_get_ifindex (NM_PLATFORM_GET, SLAVE_NAME));

View file

@ -329,13 +329,13 @@ test_ip4_zero_gateway (void)
/*****************************************************************************/
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_with_logging (argc, argv, NULL, "ALL");
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
SignalData *link_added = add_signal_ifname (NM_PLATFORM_SIGNAL_LINK_CHANGED, NM_PLATFORM_SIGNAL_ADDED, link_callback, DEVICE_NAME);

View file

@ -906,13 +906,13 @@ fixture_teardown (test_fixture *fixture, gconstpointer user_data)
/*****************************************************************************/
void
init_tests (int *argc, char ***argv)
_nmtstp_init_tests (int *argc, char ***argv)
{
nmtst_init_assert_logging (argc, argv, "WARN", "ALL");
}
void
setup_tests (void)
_nmtstp_setup_tests (void)
{
g_test_add ("/route-manager/ip4", test_fixture, NULL, fixture_setup, test_ip4, fixture_teardown);
g_test_add ("/route-manager/ip6", test_fixture, NULL, fixture_setup, test_ip6, fixture_teardown);