test: do not use __ prefix for ordinary functions
authorKay Sievers <kay@vrfy.org>
Thu, 31 Jul 2014 14:51:08 +0000 (16:51 +0200)
committerKay Sievers <kay@vrfy.org>
Thu, 31 Jul 2014 14:51:08 +0000 (16:51 +0200)
12 files changed:
test/kdbus-util.c
test/kdbus-util.h
test/test-kdbus-activator.c
test/test-kdbus-benchmark.c
test/test-kdbus-chat.c
test/test-kdbus-daemon.c
test/test-kdbus-fuzz.c
test/test-kdbus-monitor.c
test/test-kdbus-policy.c
test/test-kdbus-prio.c
test/test-kdbus-sync.c
test/test-kdbus-timeout.c

index 6bb3bbf045ad83ecbbf0361597b57d3c2fed414a..298d1ec3731b1f4911f1e2d5fc7f0ffee4703970 100644 (file)
@@ -29,9 +29,9 @@
 #include "kdbus-enum.h"
 
 #define POOL_SIZE (16 * 1024LU * 1024LU)
-static struct conn *
-__kdbus_hello(const char *path, uint64_t flags,
-             const struct kdbus_item *item, size_t item_size)
+struct conn *
+kdbus_hello(const char *path, uint64_t flags,
+           const struct kdbus_item *item, size_t item_size)
 {
        int fd, ret;
        struct {
@@ -106,11 +106,6 @@ __kdbus_hello(const char *path, uint64_t flags,
        return conn;
 }
 
-struct conn *kdbus_hello(const char *path, uint64_t flags)
-{
-       return __kdbus_hello(path, flags, NULL, 0);
-}
-
 struct conn *
 kdbus_hello_registrar(const char *path, const char *name,
                      const struct kdbus_policy_access *access,
@@ -142,7 +137,7 @@ kdbus_hello_registrar(const char *path, const char *name,
                item = KDBUS_ITEM_NEXT(item);
        }
 
-       return __kdbus_hello(path, flags, items, size);
+       return kdbus_hello(path, flags, items, size);
 }
 
 struct conn *kdbus_hello_activator(const char *path, const char *name,
index 0fcfb72a3de0c47b796b52e7cce77200dd9c4640..615f31889b68e5713cee756914bea2c2d4b70a6c 100644 (file)
@@ -44,7 +44,9 @@ void msg_dump(const struct conn *conn, const struct kdbus_msg *msg);
 char *msg_id(uint64_t id, char *buf);
 int msg_send(const struct conn *conn, const char *name, uint64_t cookie,
             uint64_t flags, uint64_t timeout, int64_t priority, uint64_t dst_id);
-struct conn *kdbus_hello(const char *path, uint64_t hello_flags);
+struct conn *kdbus_hello(const char *path, uint64_t hello_flags,
+                        const struct kdbus_item *item, size_t item_size);
+
 struct conn *kdbus_hello_registrar(const char *path, const char *name,
                                   const struct kdbus_policy_access *access,
                                   size_t num_access, uint64_t flags);
index b24ce3292c4950436df6cc2c29bd526f4a88e9bf..167018be682421958583d1092336b2d4a6eec77f 100644 (file)
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
        if (!activator)
                return EXIT_FAILURE;
 
-       conn_a = kdbus_hello(bus, 0);
+       conn_a = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_a)
                return EXIT_FAILURE;
 
index f3b49e1ca3ac88158a106bcc3c1c800f5283e16e..c56e77879ca48d4311742b56ff4e7a4bb0ae15e5 100644 (file)
@@ -264,11 +264,11 @@ int main(int argc, char *argv[])
        if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
                return EXIT_FAILURE;
 
-       conn_a = kdbus_hello(bus, 0);
+       conn_a = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_a)
                return EXIT_FAILURE;
 
-       conn_b = kdbus_hello(bus, 0);
+       conn_b = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_b)
                return EXIT_FAILURE;
 
index 7adf6fd3d5e60609598b3f1de1b54becdb32f756..ce0d83aef43cf3ed8f58a03b5a3ae2931bc206bd 100644 (file)
@@ -69,8 +69,8 @@ int main(int argc, char *argv[])
        if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
                return EXIT_FAILURE;
 
-       conn_a = kdbus_hello(bus, 0);
-       conn_b = kdbus_hello(bus, 0);
+       conn_a = kdbus_hello(bus, 0, NULL, 0);
+       conn_b = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_a || !conn_b)
                return EXIT_FAILURE;
 
index 12662fbc26b0514c9a3f775b219ebc59d04c9e42..2b2b91c47300592722b055f6e6d5d6aa12a6c63e 100644 (file)
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
        if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
                return EXIT_FAILURE;
 
-       conn = kdbus_hello(bus, 0);
+       conn = kdbus_hello(bus, 0, NULL, 0);
        if (!conn)
                return EXIT_FAILURE;
        printf("  Created connection %llu on bus '%s'\n", (unsigned long long)conn->id, bus_make.name);
index c260f8f106a815e183e4d24c0bbb718a27aaa37c..c67f7593713aa21b2a391eede4f08e3399913822 100644 (file)
@@ -131,7 +131,7 @@ static int make_bus(void)
                return EXIT_FAILURE;
 
        for (ret = 0; ret < random() % 20; ret++) {
-               struct conn *conn = kdbus_hello(bus, 0);
+               struct conn *conn = kdbus_hello(bus, 0, NULL, 0);
                if (conn)
                        add_fd(conn->fd);
        }
index 1b3838371b5f5b16ce952165fa4afc4a242520dd..b81e9ed384d39d72baa31c97f4d5b90a9da76c61 100644 (file)
@@ -156,7 +156,7 @@ int main(int argc, char **argv)
                return EXIT_FAILURE;
        }
 
-       conn = kdbus_hello(bus, KDBUS_HELLO_MONITOR);
+       conn = kdbus_hello(bus, KDBUS_HELLO_MONITOR, NULL, 0);
        if (!conn) {
                fprintf(stderr, "Unable to connect as monitor: %m\n");
                return EXIT_FAILURE;
index 6a39040a58a2fa571f4d3c7d5b6f76ceb87ba542..a2430f2706736eaa817b220911dc84ca254a09fc 100644 (file)
@@ -171,7 +171,7 @@ static int kdbus_normal_test(const char *bus, const char *name,
                conn_db[i] = NULL;
 
                /* We need to create connections here */
-               conn_db[i] = kdbus_hello(bus, 0);
+               conn_db[i] = kdbus_hello(bus, 0, NULL, 0);
                if (!conn_db[i]) {
                        ret = -errno;
                        break;
index 3c64f58d739ccb58f45eea8cface8398551f61d7..bbb48b8d5dc03797db0efc3ebe4abcb27f991ac9 100644 (file)
@@ -97,8 +97,8 @@ static int run_test(void)
        if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
                return EXIT_FAILURE;
 
-       conn_a = kdbus_hello(bus, 0);
-       conn_b = kdbus_hello(bus, 0);
+       conn_a = kdbus_hello(bus, 0, NULL, 0);
+       conn_b = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_a || !conn_b)
                return EXIT_FAILURE;
 
index 1c17989adbc58d78cbe01ff3c623ccd55241786e..bb73b39c0ce0f56989741d929f64376c04677bb0 100644 (file)
@@ -92,8 +92,8 @@ int main(int argc, char *argv[])
        if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
                return EXIT_FAILURE;
 
-       conn_a = kdbus_hello(bus, 0);
-       conn_b = kdbus_hello(bus, 0);
+       conn_a = kdbus_hello(bus, 0, NULL, 0);
+       conn_b = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_a || !conn_b)
                return EXIT_FAILURE;
 
index 518051d08bd5a021719be23ff42c18b7d43c9df0..22246ee495c1a7d1d5b966626de7f764fdf37ff4 100644 (file)
@@ -94,8 +94,8 @@ static int run_test(void)
        if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
                return EXIT_FAILURE;
 
-       conn_a = kdbus_hello(bus, 0);
-       conn_b = kdbus_hello(bus, 0);
+       conn_a = kdbus_hello(bus, 0, NULL, 0);
+       conn_b = kdbus_hello(bus, 0, NULL, 0);
        if (!conn_a || !conn_b)
                return EXIT_FAILURE;